Register | Login
Forum Index > Requests and Feedback > multi var declaration in one line
Author Message
Pages: 1 2
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[753] multi var declaration in one line - posted: 2011-11-19 21:11:15

it's better if Ziron allows this
Code:
int32 n,v,k;


http://www.freewebs.com/ogremagic/index.htm
Molotov
Member
(send private message)

Posts: 49
Topics: 21

Location:
Behind Keyboard
[754] - posted: 2011-11-20 00:59:26
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
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[755] - posted: 2011-11-20 13:15:14
indeed, i have added this and will be in the new release i will make today smile

Code:
dword i = 5, v, c;


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[761] - posted: 2011-11-20 20:55:08

hi

after updating to the newer released version , this gave error
Code:
 boolean _db, _dw;      


the log file

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



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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[764] - posted: 2011-11-20 21:07:44
aha, this only happens with function locals, i have corrected this and will update a beta in few mins.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[766] - posted: 2011-11-20 21:14:16
I have updated the "beta" link...smile

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[768] - posted: 2011-11-20 21:37:50

ok works now.

BTW why Ziron did not allow that
Code:
boolean _db, _dw;  
..........
..........
if (_db or _dw) 
 {
   .........
   .........
 }


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[775] - posted: 2011-11-21 18:28:50
this is because after a variable it is expected a comparator, each expression must be encapsulated.

e.g.

Code:
boolean a, b;

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


this will work.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1 2
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 8 user(s) online. 0 member(s) and 8 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
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd