Register | Login
Forum Index > Requests and Feedback > ZirToken
Author Message
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[530] - posted: 2011-11-09 19:58:25

i was meaning
Code:
 boolean ParesFlg = true;  


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[531] - posted: 2011-11-09 20:01:26
aha yes of course - i have fixed it and sent you PM smile

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
[532] - posted: 2011-11-09 20:04:06

ok i will try it. thanks.

http://www.freewebs.com/ogremagic/index.htm
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[533] - posted: 2011-11-09 20:08:43

ok ,very nice.

thanks.

http://www.freewebs.com/ogremagic/index.htm
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[534] - posted: 2011-11-09 20:37:47

ok here is what i done till now.
Code:
function event_Let() {
  uses edi;
  char buf[2048];
  char line[2048];
  char var[255];
  Dword Len;
  boolean ParesFlg = true;  
  len = Ziron_ExtractLine(@line, 2048);
  // remove 'let' form line
  strFold(@line, 4);
  Ziron_ShowMessage(@line);                // show our entire line for debug purpose
  if(ParesFlg)
   {  
      // get the variable name and hold it in Var 
      Ziron_GetNextToken(); // BTW if i used Ziron_ExpectNextToken(zirIdent); i always getFatalError !!!!!!!!    
      H_strcpy(@var,Ziron_GetStringValue());   
      
      // check for'=' symbol 
      eax = Ziron_ExpectNextToken(zirAssignment);
      if (eax == -1) {
           Ziron_FatalError('Expected =  symbol');
           return true;
      }
 
      // here we start getting what after '=' 
      Ziron_GetNextToken(); 
      Ziron_GetNextToken();  
        
      return true;
   }
  else
   {   
      return false;                           // let Ziron handle the line  
   }   
}


so now i need to know the variable type , if it is a string variable or digital variable
to make action according to it'type

is that possible or not ?

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[535] - posted: 2011-11-09 20:50:38
i assume Let is for variables that already exist?

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
[536] - posted: 2011-11-09 20:58:44

yes , so what ?

can you please explain more

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[537] - posted: 2011-11-09 21:09:47
reason i ask is this line:

Code:
 Ziron_GetNextToken(); // BTW if i used Ziron_ExpectNextToken(zirIdent); i always getFatalError !!!!!!!!  


if a variable already exists, it is no longer an ident it becomes a zirVar, or zirLocalVar etc...

so you would need to use a switch statement to detect if it is a global or local var, as for detecting the variable type, all variables are the same, they are just by size, floats are an exception, however i guess i could add a function to return the declared variable type string value.

Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
create new reply


Quick reply:

Message:



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