Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Requests and Feedback

multi var declaration in one line

A community discussion post from the original code:zIRON forum.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

multi var declaration in one line

it's better if Ziron allows this

int32 n,v,k;

http://www.freewebs.com/ogremagic/index.htm

Replies

Molotov member
Posts
49
Threads
21
Location
Behind Keyboard

Sounds like a great idea..

Would make the declaring of multiple variables alot easier/faster.

"Lerning new things is what life is all about, if you are always doing the same old things day in and day out you might aswell just kill yourself." - ME d^_^b

Colin admin
Posts
928
Threads
49
Location
Bulgaria

indeed, i have added this and will be in the new release i will make today :)

dword i = 5, v, c;
Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

hi

after updating to the newer released version , this gave error

 boolean _db, _dw;      

the log file

Expected ; or = but found , in [masm.zir] Code: boolean _db, _dw;

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

aha, this only happens with function locals, i have corrected this and will update a beta in few mins.

Colin admin
Posts
928
Threads
49
Location
Bulgaria

I have updated the "beta" link...:yum:

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok works now.

BTW why Ziron did not allow that

boolean _db, _dw;  
..........
..........
if (_db or _dw) 
 {
   .........
   .........
 }

http://www.freewebs.com/ogremagic/index.htm

Colin admin
Posts
928
Threads
49
Location
Bulgaria

this is because after a variable it is expected a comparator, each expression must be encapsulated.

e.g.

boolean a, b;

if ((a) or (b)) {
	print('test\r\n');
}

this will work.