Hi,
I am using OpenTBS for several years now. I have an issue when using nested if-then-else conditions, that contain single quotes as content, inside a block. The parsing is not done as suspected.
For this example, I have a block with 2 records inside a table (template created with LibreOffice).
Here is an example of the source code:
Test [testtab.headvar;block=tbs:row;magnet=tbs:row]
[testtab.checkvar1;if [val]=N;then 'Begin if blo''ck 1';else '']
[testtab.checkvar2;if [val]!=N;then 'Begin if blo''ck 2';else 'Begin else blo''ck 2:
[testtab.checkvar3;if [testtab.checkvar3]=[testtab.checkvar4];then 'Begin nested if blo''ck 3_1.';else 'Begin nested else blo''ck 2_1.']
Some te'xt after nesed block in block 2.
[testtab.checkvar1;if [val]=N;then 'Begin nested if blo''ck 2_2.';else '']']
|
Below, you can find the output. My concern is in "Test Block2". You can see that at a certain point the single quote of the condition is visible and the parsing goes wrong.
Test Block 1
[testtab.checkvar2;if [val]!=N;then 'Begin if blo''ck 2';else 'Begin else blo''ck 2:
Begin nested if blo'ck 3_1.
Some te'xt after nesed block in block 2.
']
Test Block2
Begin if blo'ck 1
'Begin else blo''ck 2:
Begin nested else blo'ck 2_1.
Some te'xt after nesed block in block 2.
Begin nested if blo'ck 2_2.'
|
How can I fix this issue? Is there a more proper way of implementing nested if-structures?
Thank you,
Andries