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
[538] - posted: 2011-11-09 21:16:07

i guess i could add a function to return the declared variable type string value.


i think it is good idea so , if the var type is string and found something like that
Code:
char var[1024];
H_strcpy(var,'geust');
Let  myvar = 'welcome' + var + 'here ..' 


and if it is digital so ziron will handle it.

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[539] - posted: 2011-11-09 21:23:58
i have re-updated the package, i've added 2 new pf functions

Ziron_GetID - this function can be called when the current token type is a variable.

and

Ziron_GetVarTypeString - pass the id to this function and it will return the string value of the data's type.

let me know...

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
[540] - posted: 2011-11-09 21:27:48

can i use something like this
Code:
 Ziron_ExpectNextToken(zironVar or zironLocalVar);


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

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[541] - posted: 2011-11-09 21:40:14

Code:
      eax = Ziron_GetID();
      ecx = Ziron_GetVarTypeString(eax); 
      Ziron_ShowMessage(ecx);    


very nice , now we need something like 'strcmp in C' to compare the returned value from Ziron_GetVarTypeString against variables such as int32 char ....etc


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[542] - posted: 2011-11-09 21:40:35
no, but i plan to add something to accept more types at a later time, for now you can just do:

Code:
eax = Ziron_GetNextToken();
case (eax) {
   state zirVar:
   state zirLocalVar:
   state zirLocalParam:
      break;
   default:
      FatalError('Unexpected token ....
      return true;
}
//since it did not return we know it had to be one of the 3 :)

//rest of code here.


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: 933
Topics: 55

Location:
OverHertz Studio
[543] - posted: 2011-11-09 21:42:58

now we need something like 'strcmp in C' to compare the returned value from Ziron_GetVarTypeString against variables such as int32 char ....etc


good idea, i will get with that 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
[544] - posted: 2011-11-09 21:44:03

can i check variable type only by Ziron_GetID ?

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

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[545] - posted: 2011-11-09 21:53:44

i mean something like enum , so we can check returned value of Ziron_GetID against enum.

http://www.freewebs.com/ogremagic/index.htm
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 10 user(s) online. 0 member(s) and 10 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