Author Topic: bcx to Oxygen basic  (Read 4782 times)

0 Members and 1 Guest are viewing this topic.

Charles Pegge

  • Guest
Re: bcx to Oxygen basic
« Reply #15 on: April 03, 2013, 08:40:41 AM »
Hi Emil,
 your returned lines will always include the terminators, therefore you will never get an empty line to terminate with. This is why I captured the line string before skipping the termination chars.

Emil_halim

  • Guest
Re: bcx to Oxygen basic
« Reply #16 on: April 03, 2013, 08:57:13 AM »

yes Charles ,

my source code may contain an empty line and that does not mean the end of string (source code) , so i need
an other way to  terminate the loop.

Emil_halim

  • Guest
Re: bcx to Oxygen basic
« Reply #17 on: April 03, 2013, 09:04:56 AM »

I am thinking in c language , char* is a pointer to the buffer of returned string and if is null that will end the loop ,

what is your opinion ?

Charles Pegge

  • Guest
Re: bcx to Oxygen basic
« Reply #18 on: April 03, 2013, 11:03:43 AM »
You can record the ascii value of the terminating character, as a global state variable possibly, and test for zero to exit the line-reading loop.

 I use global state variables in the compiler to hold parsing data like word-position word-ascii, next- word-position, word-length.