Posted: Mon Feb 07, 2022 4:47 pm Post subject: instr statement buggy in 2.0.8.5 ?
Hi,
i'm fighting with the INSTR(...) statement in Version 2.0.8.5
The statement only returns the correct position of the seach string ONLY if the start position is 0. This behavior is only evident in 2.0.8.5. I.e. in 2.0.8.4 it works correctly.
Attached is some simple code that inputs a start position and should return the position of the nearest blank char in end_pos. Works fine in 2.0.8.4 but not in 2.0.8.5.
Any suggestions what i'm doing possibly wrong?
Many thanks in advance,
Gerald
Code:
$regfile="m328pdef.dat"'Proc-Deklarationen
Const Quartz =16000000'set real clock frequency for timer ISR
$crystal= quartz 'use this for baud-rate etc. $baud=9600'set default baudrate
$hwstack=128'use 128 for the hardware stack $swstack=100'use 100 for the SW stack $framesize=160'use 160 for the frame space
Config Base =0'array-indexes start at 0 config submode = new 'subs will be handled the new way ...
dim cmd asstring*80 dim sep_char asstring*1 dim start_pos asinteger, end_pos asinteger
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum