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 > Samples > Enum sample
Author Message
Pages: 1
Admin
Site Admin

avatar

(send private message)

Posts: 925
Topics: 54

Location:
OverHertz Studio
[74] Enum sample - posted: 2011-10-08 22:23:36
small sample showing the basics of enumeration

Code:
program WIN32CUI 'Sample';

#include 'console.zir';
#include 'ch.zir';

//////////////////////////////

enum DayOfWeek {
  Monday = 1, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday,
}

DayOfWeek Today = Sunday;

if (Today > Friday) {
  print('Today is a week-end day!\r\n');
} else {
  print('Today is a week-day!\r\n');
}

wait_key(nil);

ExitProcess(0);


the above code will output:

Code:
Today is a week-end day!
Press any key to continue


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, 9:01 am.


Statistics:
Threads: 223 | Posts: 1837 | 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