Register | Login
Forum Index > Source Help > PROBLEM using compiler
Author Message
Pages: 1
jackel
Member
(send private message)

Posts: 19
Topics: 6

Location:
[1354] PROBLEM using compiler - posted: 2013-03-02 14:40:24
Okay what im doing here is writing my code into Zeditor Studio Express & at the end when i open Ziron Compiler & i paste my code into ziron compiler BUT i just see Zirons Comand Window for half a second, i see sum white code under that i see red code & in a split second Ziron compiler dissapears. I dont think im compiling this code properly inn Ziron`s compiler.
Is there a quick 123 on how i should be using Ziron Compiler correctly as ive never used a compiler like that before appart from writing games as a kid, I thought compiler would wait, hold, stall, kind of thing & show me any errors.
So basicly i have never seen anything at all in zirons compiler appart from that very quick flash when i`m coppying my code from zeditor into ziron compiler.
It would be nice to use ziron`s compiler in the correct fashion & any help would be great as always respectfull of the time you guys take out just to help others (thats something that makes me say to myself that guy must be a good fellow). As all ive had is 100% GOOD HELP in this forum great help is hard to get nowadays.


AGAIN i can only say is -- > gives a BIG hug ma main man :P

100% REESPECT TO A GOODFELLA FROM YOUR MATE THX AGAIN
jack ;-)



jack.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1355] - posted: 2013-03-02 16:12:14
Ok you don't paste code into Ziron, you must call the Ziron.exe with the filename followed. So step by step example:

In the directory of Ziron.exe for example, create a batch file, "compile.bat"

edit that and paste in the following:

Code:
Ziron.exe sample.zir


now create another file in the same dir as the ziron.exe named "sample.zir"

paste inside

Code:
program WIN32CUI 'my app';

#include 'ch.zir';

wait_key('Hello, World!');
ExitProcess(0);


save that and then double click the batch file and it will assemble the sample.zir into sample.exe

an alternative, easier way is to drag your source.zir file over the Ziron.exe and drop it, Ziron will open and assemble the file into the location it was dropped.

Check inside the samples directory of the package, try run some of the .bat files and you will see it will create an exe, edit the bat files to understand how it does this smile

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

Posts: 19
Topics: 6

Location:
[1356] AWESOME HELP MATE :-) - posted: 2013-03-02 20:21:27
Alright Mate Thx 10 x I cant believe that. chrs mate , thats my 1st visual mate 2 button test 1 & test 2 ;-) HeHee Now i can get cracking man if i had av done that in first place, i`d be flying by now, A GUI :D hehey. I kept my backward compatibility work as that got the code innit BUT think i will keep codes i learn from & trash that backward compatible part of ME ehaay lol

As you can imagine that was like getting handed 2 camell from 1 bandito in feirce desert when i was looking for 1 leg`d donkey smile

A "BIG" THANKS for opening my eyes man, now i can write some codes :D smile ;-)

Respect
jack.

jack.
jackel
Member
(send private message)

Posts: 19
Topics: 6

Location:
[1361] - posted: 2013-03-03 17:50:44
i notice this wait_key when should i use wait_key as id like to see my code everytime like the hello world! , where would i use wait_key if i wanted to see our_hubs_a_private_hub project

Code:
 program WIN32CUI 'my app';

#include 'ch.zir';

wait_key('Hello, World!');
ExitProcess(0); 



our_hubs_a_private_hub

Code:
program WIN32CUI  'our_hubs_a_private_hub';

#include 'ch.zir';

  if (1 == 1) {
  our_hubs_a private_hub
} elseif (1 == 2) {
  you_can_use_our_public_hub
} else {
  you_can_use_any_public_hub
}


ExitProcess(0); 


Regards
jack
smile

jack.
Admin
Site Admin

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1362] - posted: 2013-03-03 19:05:02
wait_key is just a function, you can place it after any text or operation to wait for keypress, so in your case:

Code:
program WIN32CUI  'our_hubs_a_private_hub';

#include 'ch.zir';

if (1 == 1) {
  //note that these lines you have written do nothing and are invalid.
  our_hubs_a private_hub
} elseif (1 == 2) {
  you_can_use_our_public_hub
} else {
  you_can_use_any_public_hub
}

wait_key();

ExitProcess(0); 


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

Posts: 19
Topics: 6

Location:
[1364] - posted: 2013-03-03 22:44:27
Alright mate, thats just the answer i was looking for, basicly wait == hold halt wait_key waits on user till told to go on, im my case Hit Enter smile innit yeah, Oh-Aye thanks again for the quick reply man. this is way off topic but dont know where to write this: "so here you go my main man".
*Hey your a good Admin 'you`ve always got your eye on the ball & i like the way you run your forums sites etc & how you lay your rules down its all very easy going & nice & neat nice atmosphere & nice people nice place to be & glad im here chrs br0 smile.

Respect
jack.
smile

jack.
jackel
Member
(send private message)

Posts: 19
Topics: 6

Location:
[1365] - posted: 2013-03-03 23:17:58
Alright how are you mate, I was just looking at your using_dir sample bro smile i`m just getting idea of how your using wait_key *thats nicely done, As Its so little code & can do so much innit, i coppied below mate incase you didnt know what code i meant although im sure you did since you wrote it bud ehhey, lol

Code:
program WIN32CUI 'sample';

//changables
#define WAIT_KEY_ENABLED; //remove this line for the console to stay open until you press a key

//optimisation directive.
#cpu 486;

//include directive (include another file)
#include 'console.zir';

//note directives can use $ or # e.g.

#define TESTING;

$ifdef TESTING
  $repeat 50:
    print('testing\r\n');
  $end
$end

#ifdef TESTING
  $repeat 10:
    print('testing\r\n');
  $end
#end

#repeat 5:
  print('test\r\n');
#end

#ifdef WAIT_KEY_ENABLED
  wait_key(nil);
#end

ExitProcess(0); 


Regards
jack.
smile

jack.
Pages: 1
create new reply


Quick reply:

Message:



Currently Active Users:
There are currently 11 user(s) online. 0 member(s) and 11 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