Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- script typedef ffc class; //can now declare 'class script'.
- class cript my_class
- {
- const int SZ = 256; //constant defined at script scope
- //globally available as my_class.SZ
- //access locally as 'SZ'
- int RAM[SZ]; //array defined at script scope, sized to constant SZ
- //globally available as my_class.RAM[]
- //acces locally as 'RAM[]'
- }
- void foo()
- {
- int size = my_class.SZ; //get the constant SZ from pasudo-class 'my_script'
- int a = myclass.RAM[1]; //get data from the array in that 'class'
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement