Register | Login
Forum Index > General Discussion > end of line problem
Author Message
Pages: 1 2
Emil_halim
Ziron Beta Tester

avatar

(send private message)

Posts: 639
Topics: 104

Location:
Alex, Egypt
[1129] end of line problem - posted: 2012-05-17 21:03:35

sometimes the end of line is some space chars , so when test the end of line by Ziron_IsNextLineBreak it return false and that means we did not goto the end yet ,
so i use Ziron_GetNextToken to get the rest of line , but instead we get the token in the next line.

so can Ziron_IsNextLineBreak considers the tab , white space, that at the end of line as endline

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1130] - posted: 2012-05-17 21:46:05
it should already take tabs and spaces into consideration, can you make a small plugin that re-produces the problem?

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
[1131] - posted: 2012-05-17 21:54:33

ok , when i extend my define plugin like this

Code:
function event_Define() 
{
    uses edi esi ecx ebx;
    char  buf[2048];
    char  idnt[255];
    char  val[255];
            
    eax = Ziron_ExpectNextToken(zirIdent); 
    if (eax == -1) {
        Ziron_FatalError('Expected identfire Name');
        return true;
    }
    H_strcpy(@idnt, Ziron_GetStringValue());
    
    eax = Ziron_GetNextToken();
    if( eax == zirHexadecimal)
     {  
        H_strcpy(@val, '0x');
        H_strcat(@val, Ziron_GetStringValue());
     }
    else
     {
       H_strcpy(@val, Ziron_GetStringValue());
       
       // here is my extension    
         eax = Ziron_IsNextLineBreak();
         while(!eax)
          {
                  Ziron_GetNextToken(); 
                  H_strcat(@val, Ziron_GetStringValue()); 
                  eax = Ziron_IsNextLineBreak();    
          }
     }    
    
    buf=0;    
    H_strjoin(@buf ,'const ', @idnt, ' = ', @val , ';');
    
    Ziron_Exec(@buf); 
    
    return true; 
}


and here is line makes the problem
Code:
#define DIK_BACKSPACE       DIK_BACK            /* backspace */
                                    ^^^^^^^^^^^^
                                        /\
                                     those whtespace are the problem    





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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1133] - posted: 2012-05-17 22:21:44
OK i've uploaded new beta, i believe the problem is not the spaces, it was the block comment, it checked for only single line comments(//)

I have corrected this and it should work smile 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
[1135] - posted: 2012-05-17 22:39:33

got strange error when compiling my plugin , her it is

[414,25]: Expected float number or segment or segment:offset or procedure/function call or [expression] or ) or number or hexadecimal or register or procedure address or data address or opcode or register pointer or constant string or constant or local variable or local parameter or local variable address or variable but found dw2str in [strings.zir]
Code:
eax = strLen(dw2str([ebx], @tmpBuf));


BTW, my plugin did not have dw2str function.

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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1136] - posted: 2012-05-17 22:57:29
ok try opening includes/strings.zir and below the first include add

Code:
#include 'zirutils.zir';


it should look like:

Code:
//******************************************************//
//                                                      //
//    Ziron Run Time Library                            //
//    String Utilities (strings.zir)                    //
//                                                      //
//    Copyright (c) 2011-####, OverHertz OOD            //
//    Source Code (c) All rights Reserved.              //
//                                                      //
//******************************************************//

#include 'smm32.zir';
#include 'zirutils.zir';

//
// Macros First
//

...


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
[1137] - posted: 2012-05-17 23:03:04

after changing got that error

[520,50]: Expected float number or segment or segment:offset or procedure/function call or [expression] or ) or number or hexadecimal or register or procedure address or data address or opcode or register pointer or constant string or constant or local variable or local parameter or local variable address or variable but found idMOVE_NEXT_CHAR in [zirplug/framework.zir]
Code:
Ziron_MoveNextChar = Ziron_Get(idMOVE_NEXT_CHAR);


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

avatar

(send private message)

Posts: 933
Topics: 55

Location:
OverHertz Studio
[1138] - posted: 2012-05-17 23:10:29
brrrr lol ok open up includes/zirplug/framework.zir

search for "id_MOVE_NEXT_CHAR" i added a _ probably before saving and updating beta rar by accident.

just remove the _

Code:
  idMOVE_NEXT_CHAR = 5009,


Download Ziron
Get free hosting for Ziron related fan-sites and Ziron projects, contact me in private message.
Pages: 1 2
create new reply


Quick reply:

Message:



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