Author |
Message
Pages: 1
|
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [156] static variable in function - posted: 2011-10-27 19:18:39 does Ziron support static variable inside the function or procedure ? http://www.freewebs.com/ogremagic/index.htm |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [157] - posted: 2011-10-27 19:40:18 what do you mean by static variables? global variables inside function? if yes then.. Code:
each global inside a function will have their own version of myInt in a local scope. the output should be: Code:
Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [158] - posted: 2011-10-27 19:42:13 well , that waht i am asking for. thanks. http://www.freewebs.com/ogremagic/index.htm |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [159] - posted: 2011-10-27 19:46:37 maths functions such as add and so on need some work but another example Code:
output: Code:
Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Emil_halim Ziron Beta Tester (send private message) Posts: 639 Topics: 104 Location: Alex, Egypt | [160] - posted: 2011-10-27 19:52:38 does #define directive works as in C&C++ , so i what to use static instead global statement? http://www.freewebs.com/ogremagic/index.htm |
Admin Site Admin (send private message) Posts: 933 Topics: 55 Location: OverHertz Studio | [168] - posted: 2011-10-27 20:32:25 static keyword is reserved for something else, that once it is corrected will be explained in detail via documentation. and the #define keyword works different to c and c++, it only accepts a single parameter (for now) #define ABC; #define 1234; check documentation via the menu for directives. Download Ziron Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message. |
Currently Active Users: There are currently 1 user(s) online. 0 member(s) and 1 guest(s) Most users ever online was 1046, January 28, 2022, 2:08 pm. Statistics: Threads: 225 | Posts: 1848 | Members: 51 | Active Members: 51 Welcome to our newest member, yecate |