Register | Login
Forum Index > Bugs and Fixes > expr ? : error
Author Message
Pages: 1
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1640] expr ? : error - posted: 2015-02-06 21:11:31

there is error in ? : expr , try compile this
Code:
program PE32_CUI 'test application';

#include 'platform_def.zir';
#include 'console.zir';

function abs(int32 n)
{  
   eax = (n >= 0) ? n : -n;
}

edx = abs(100);
print('Number: ', [dword]edx ,'\r\n');

wait_key();
ExitProcess(0);


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1647] - posted: 2015-02-07 17:08:10
I have added support for this for next release. Thanks.

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
[1654] - posted: 2015-02-08 17:53:54

ok this work
Code:
 eax = (n >= 0) ? n : -n;


but why this not
Code:
  return (n >= 0) ? n : -n;


what came after '=' or 'return; is supposed to be expression pares.


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1655] - posted: 2015-02-08 19:26:20
Added support for this, thanks for request, it was a good idea smile

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


Quick reply:

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
const Copyright = '2011-2024 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd