[PB4] Array in Structure

Everything else that doesn't fall into one of the other PB categories.
User avatar
Flype
Addict
Addict
Posts: 1542
Joined: Tue Jul 22, 2003 5:02 pm
Location: In a long distant galaxy

Post by Flype »

Please Fred,
can you give some informations about this 'stack' behaviour.

What should we (users) know about this limit ?
Is it possible to catch this problem at compile time ?

Can this limit be changed by a compiler directive ?

Is this limit same for all (Everybody, OS, CPU, PB Version) ?

Just look at this sample code :
On my computer the limit is 12000 bytes

Code: Select all

#SIZE = 13000 
;#SIZE = 12000 

Structure TEST 
  field.b[#SIZE] 
EndStructure 

Procedure.s test() 
  
  Protected ret.s 
  Protected var.TEST 
  
  If var
    ret = "success" 
  Else 
    ret = "failed" 
  EndIf 
  
  ProcedureReturn ret 
  
EndProcedure 

Debug "start" 
Debug "test() : " + test() 
Debug "end"
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer
Post Reply