Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/overhertz/domains/codeziron.com/public_html/ziron/ziron.db.connector.php on line 13
code:zIRON - Get the latest releases plus source-codes and tutorials - Simplifed Assembly Programming Language.
Register | Login
Forum Index > Requests and Feedback > Binary constants
Author Message
Pages: 1
0CodErr
Ziron Guru
(send private message)

Posts: 197
Topics: 37

Location:
[1475] Binary constants - posted: 2015-01-17 13:20:39
It seems there is not yet supported.
It may be done by analogy with hex constants:
Code:
const hex_const = 0xAABBCCDD;
const bin_const = 0b11111111;

Or this way: Code:
const bin_const = 10101010b;

And then may be also should add Code:
const hex_const = 0AABBCCDDh;
Admin
Site Admin

avatar

(send private message)

Posts: 925
Topics: 54

Location:
OverHertz Studio
[1480] - posted: 2015-01-17 14:27:00
Added to my to-do list 0b11....

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: 925
Topics: 54

Location:
OverHertz Studio
[1484] - posted: 2015-01-20 21:32:41
I have added 0b...., it works for numbers only at current. If you have further suggestions regarding binary usage, please let me know.

Code:
edi = 0b00000000000000000000001000000000;
print('output: ', edi, '\r\n');


output: 512

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
0CodErr
Ziron Guru
(send private message)

Posts: 197
Topics: 37

Location:
[1486] - posted: 2015-01-20 21:47:47
it works for numbers only at current
And yet what for are you planning?
Admin
Site Admin

avatar

(send private message)

Posts: 925
Topics: 54

Location:
OverHertz Studio
[1487] - posted: 2015-01-20 21:50:39
I think it may be worth to allow binary to be used also for string constants and decimals. But I will have a fiddle with syntax to see what will work best.

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 999, May 11, 2018, 10:01 am.


Statistics:
Threads: 224 | Posts: 1838 | Members: 50 | Active Members: 50
Welcome to our newest member, NobodyAtWork
const Copyright = '2011-2018 © OverHertz Ltd. All rights reserved.';
Web development by OverHertz Ltd