Re: 8051 and a C switch statement



On Dec 28, 4:39 pm, Martin Griffith <mart_in_medina@xxxxxxxx> wrote:
" how big can I make the switch statement?"
Whats the limit?
I'm using the rasionance C compiler.


The C standard (C89/90) requires that the implementation support at
least 257 labels in a switch statement. This is unlikely to be an
issue for an 8052. Your compiler's conformance to the C standard is
unfortunately a different issue, which you'll have to take up with the
vendor.
.



Relevant Pages

  • Re: switch() Statement Question
    ... minimum value for the maximum number of case labels that a conforming ... The standard requires that a conforming implementation be able to ... other things) at least "1023 case labels for a switch statement ...
    (comp.lang.c)
  • Re: XML and OO COBOL
    ... > We can do this with CoBOL, ... I don't like data files that can not be passed ... The Labels are Standard clause must be present to qualify as a standard ...
    (comp.lang.cobol)
  • Re: [ Attn: Randy ] Ad-hoc Parsing?
    ... > override the standard mathematical precidence. ... thought "typedef struct" was rather annoying in C because you almost always ... a "mechanism" you can use that does macros and local labels (and, ... of course...one will be "provided" in a "standard macros" ...
    (alt.lang.asm)
  • Re: Identifying potions from memory
    ... The modern world comes with labels because the containers are all standardised and repeatedly purchased with the product. ... Same for potions, really. ... you'd find it even more likely that there might not be a standard labelling system. ...
    (rec.games.frp.dnd)
  • Re: man 3 switch
    ... the switch statement in gcc may not be exactly the same as the switch ... As C is an ISO standard, I sincerely doubt there would be any ... of arithmetic operators of equal precedence in the same statement (in ... C allows quite a bit of leeway to the compiler implementation. ...
    (Fedora)