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
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
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.
ok i was talking about that
for (edi = cnt downto 0)
if i change it to this i got access violation
for (edi = 0 to cnt)
http://www.freewebs.com/ogremagic/index.htm
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
#define str(x) #x
i used this part to detect '#' but seem's ziron erase it.
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
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"
ok , but the same thing when checking by token.
see this
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
re-read my post, i have just explained anything with # or $ in front of word is a zirDirective
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