Register | Login
Forum Index > Plugins > #define plugin
Author Message
Pages: 1 2 3 4
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1201] - posted: 2012-05-22 20:49:52


ok , thanks for that fix.

still for statement has the error , i really do not know if it is belong to for handler or
it is something with local variable?

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1202] - posted: 2012-05-22 21:12:14
I compiled the source you provided with the for statement update and i did not have any crashes, what OS are you running? maybe it is a OS related issue.

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
[1203] - posted: 2012-05-22 21:29:07

ok i was talking about that
Code:
  for (edi = cnt downto 0)


if i change it to this i got access violation
Code:
  for (edi = 0 to cnt)


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

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1204] - posted: 2012-05-22 21:35:34


also i have an other thing.

i am working in extend define directive to be 100% compatible with c/c++ one.

so i have to check the body of directive against '#' that in the front of param.

Exm
Code:
  #define  str(x)  #x  


i used this part to detect '#' but seem's ziron erase it.

Code:
          val = 0;
          eax = Ziron_IsNextLineBreak();
          while(!eax)
           {
               Ziron_GetNextToken(); 
               eax = Ziron_GetStringValue();
               // if it has an other line
               if(char[eax] == "\\") // '\'  ascii=92
                 {
                  H_strcat(@val, '\r\n'); 
                  edi = Ziron_GetNextToken(); 
                }
               elseif(char[eax] == "#")    // ziron did not detect it      
                {
                    Ziron_ShowMessage('found hash'); 
                }
                
               // adding '$' to param
               ebx = @parArr;
               for (edi = cnt downto 0) 
                {
                    if(_strCmp(ebx, Ziron_GetStringValue())) 
                     {
                        H_strcat(@val,' $'); 
                        break; 
                     }     
                    ebx += 128;       
                } 
              
               H_strcat(@val, Ziron_GetStringValue()); 
               H_strcat(@val, ' ');
               eax = Ziron_IsNextLineBreak();    
           }


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1205] - posted: 2012-05-22 22:31:58
in Ziron, #test and $test are both classed as zirDirective, you can just do a token check for zirDirective, the string will equal the actual text of the directive, in this case "test"

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
[1206] - posted: 2012-05-22 22:38:26

ok , but the same thing when checking by token.

see this
Code:
          while(!eax)
           {
               tok = Ziron_GetNextToken(); 
               eax = Ziron_GetStringValue();
               // if it has an other line
               if(char[eax] == "\\") // '\'  ascii=92
                 {
                  H_strcat(@val, '\r\n'); 
                  tok = Ziron_GetNextToken();
                  eax = Ziron_GetStringValue(); 
                }
                
               if( tok == zirHash)  // still did not detected
                {
                  .......
                  .......


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1207] - posted: 2012-05-22 22:52:37
re-read my post, i have just explained anything with # or $ in front of word is a zirDirective

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
[1208] - posted: 2012-05-22 23:00:03

i re-read your post and found this

you can just do a token check for zirDirective


so i have changed my code from just checking the string and check it by token , so that i stored the token value that return from Ziron_GetNextToken and check it against zirHash.

i did what you suggested , so what is the wrong here?

http://www.freewebs.com/ogremagic/index.htm
Pages: 1 2 3 4
create new reply


Quick reply:

Message:



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