CompuServe Messages

Array filling problem

    12-Nov-94 21:11:50
Fm: Doug Walker 71165,2274
To: Henry Williams 73527,1446
If the array is global, why not simply declare it "static" or move the declaration external to any function? If you do that, the array won't be a local variable, so it won't take up stack space. BTW, SAS/C and I think DICE both provide stack CHECKING code. In SAS/C, this would have brought up a requester when you entered your function telling you that you had exceeded your stack space. Stack checking is on by default with SAS/C. I don't know what compiler you are using, but I suggest looking into the stack checking code provided by your compiler. Lastly, you can adjust the stack your program gets if you are using SAS/C V6.0 or above by declaring an external variable called __stack and initializing it to the number of bytes you want (make sure it's a multiple of 4.) In SAS/C 5.10, the name is _stack, but in that version it only works with the cres.o and cback.o startups. –Doug