
|
I found local arrays are forbidden. There is no feedback, the code just does not work at all. main(){ int mydata[100]; // doesn't work int far mydata[100]; // doesn't work int near mydata[100]; // doesn't work far int mydata[100]; // doesn't work static int mydata[100]; // works is there a workaround ? Rene -- Tel. 01 / 633 47 39 HCI F236 ETH Hoenggerberg |
|
|
|
Hi Rene, If you say doesn't work, you mean the code fails, or that the compiler/linker complains. I assume it the code that fails, did you check the allocated stack size? Personally I wouldn't use local arrays, since they are allocated on the stack. This means that there is no feedback if there is enough free stack space for the arrays. Only a not working application if there isn't enough space. static (or global static) arrays are located in normal memory, so the linker would complain of insufficient memory. Another option might be to dynamically allocated the arrays. But that depends on your application. Cheers, Paul Kamphuis software architect Relitech BV The Netherlands -----Original Message----- From: "Rene Tschaggelar" <> Sent: Monday, February 25, 2002 2:16 PM To: "" <> Subject: [code-comp] Bug in Codecompose Studio 2.0 for C6201 - local arrays I found local arrays are forbidden. There is no feedback, the code just does not work at all. main(){ int mydata[100]; // doesn't work int far mydata[100]; // doesn't work int near mydata[100]; // doesn't work far int mydata[100]; // doesn't work static int mydata[100]; // works is there a workaround ? Rene -- Tel. 01 / 633 47 39 HCI F236 ETH Hoenggerberg ------------------------ Yahoo! Groups Sponsor ---------------------~--> Sponsored by VeriSign - The Value of Trust Secure all your Web servers now - with a proven 5-part strategy. The FREE Server Security Guide shows you how. http://us.click.yahoo.com/uCuuSA/VdiDAA/yigFAA/26EolB/TM ---------------------------------------------------------------------~-> _____________________________________ |