At 06:55 AM 12/14/2004, you wrote:
Hi,
Thank you for the info. Especially, I was actually thinking of a construct
like the one showed below:
switch(casevar)
{
case 1:
        int alpha;
case 2:
        int beta;
}
I have something like this in my Startup function top handle the launch
codes. I define Variables in the case statements only in order to speed up
launch code handling. All of this never ever was a problem with OnBoardC.
However, PODS refuses to build the file. Just as Info, I am creating a
Managed Make C file. Is there a way to get this working(other than inserting
{})? I feel that this will make the PODS more uncomfortable to use.
PalmSource Boys, will something happen there?

You could write

switch(casevar)
{
case 1:
     {
         int alpha;
     }
case 2:
     {
         int beta;
     }
}

introducing new scopes for each of the case items. You could also name your source file as .cpp and use C++, which allows the declarations internal to a function. I don't see a way to get GCC 2.95, as used in PRC-Tools, to allow the C99 style internal declarations; I tried adding a -std=iso9899:199x switch, but it didn't affect this.


-- Ben Combee, Technical Lead, Developer Services, PalmSource, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/


-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to