Skip to content
Low-level programming · Higher-level thinking
Login Register
Forum / Requests and Feedback

get entire line

A community discussion post from the original code:zIRON forum.

Replies

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

got this error

Ziron Compiler 1.1.27.6 Copyright (C) 2011. OverHertz Ltd. All rights reserved. -------------------------------------------- 11/8/2011 3:55:34 PM -------------------------------------------- PlugSys: Emit plugin has loaded! -------------------------------------------- [13,20]: Expected number or hexadecimal but found - in [zirplug/framework.zir] Code: zirUnexpected = -1, // Result for Ziron_ExpectNextToken if not expected token.

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

strange,, ok then remove the zirUnexpected = -1, line and i will correct it and re-add it for next release.

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok removed and got that

Ziron Compiler 1.1.27.6 Copyright (C) 2011. OverHertz Ltd. All rights reserved. -------------------------------------------- 11/8/2011 4:02:39 PM -------------------------------------------- PlugSys: Emit plugin has loaded! -------------------------------------------- [240,13]: Expected } or identifier but found zirCALL in [zirplug/framework.zir] Code: zirCALL = 416, // call

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

infact i know why, enums don't support negative numbers and probably not a good idea... above the enum .. add a new const

const zirUnexpected = -1;		// Result for Ziron_ExpectNextToken if not expected token.

enum ZirToken: DWord {
	zirSEMI_COLON = 1,			// ;
	zirCOLON = 2,				// :
	zirCOMMA = 3,				// ,
	zirFullstop = 4,			// .

.....
Colin admin
Posts
928
Threads
49
Location
Bulgaria

aha, zirCall is a problem because of the zircall calling method.. ok we can change this to

zirCallF = 416,

Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok works fine now .

what about my previous post #[467]

thanks.

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

Colin admin
Posts
928
Threads
49
Location
Bulgaria

you could do it with a peeknexttoken after

      eax = Ziron_ExecuteF(@buf);
      if (eax == false) {
          Ziron_FatalError('Error plugin');
         return true;
       }

but i guess it would be complex, to be honest, that line looks very complex, would it not be better to use a comma?

mov 10 into eax, 20 into ebx, 5 into edx
Emil_halim member
Posts
639
Threads
104
Location
Alex, Egypt

ok , good solution.

BTW this was works ok with previous ver but now give this error

Ziron Compiler 1.1.27.6 Copyright (C) 2011. OverHertz Ltd. All rights reserved. -------------------------------------------- 11/8/2011 4:12:45 PM -------------------------------------------- PlugSys: Emit plugin has loaded! PlugSys: Mov plugin has loaded! PlugSys: mov 10 into eax PlugSys: eax = 10; PlugSys: mov 100 into edx; print('edx = ', PlugSys: edx = 100; PlugSys: mov 300 into esi print('esi = ', PlugSys: esi = 300; PlugSys: mov eax, 10; into ax; -------------------------------------------- [22,23]: Expected >> or << or += or -= or = or ( or as or ++ or -- but found ; in [testprg.zir] Code: mov eax, 10; into ax;
program WIN32CUI 'mov plugin test';

#include 'console.zir';

// this will pares with mov plugin
mov 10 into eax
 
// this will pares by Ziron 
mov ebx, 30
 
print('eax = ', eax:int, '\r\n');


mov 100 into edx; print('edx = ', 
                   edx:int, '\r\n');
                   
mov 300 into esi  print('esi = ', 
                   esi:int, '\r\n');  
                   
//mov 10 into eax 20 into ebx 30 into ecx          

mov eax, 10; into ax;                           

wait_key(nil);
ExitProcess(0);

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