Project

General

Profile

Actions

Bug #501

closed

Using and / or statements in a single line is limited to 13/14.

Added by malcolm harvey about 4 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Low
Target version:
-
Start date:
09/19/2020
Due date:
% Done:

0%

Estimated time:
1:00 h
Affected version:

Description

Currently using AND/OR statements in a single line is limited to 13/14.
EG: if firstword$="something " or firstword$="something " or firstword$="something " etc etc up to 20.
The OR stops at about 13th OR statement after this, the next OR/AND is just in white.?

Same with the AND statements 13 as well.

Note: This has been pointed out to be a colour related problem, and infact the or/and statements still work upto 20 etc.

Actions #1

Updated by Brian Flanagan about 4 years ago

  • Priority changed from Normal to Low
  • Estimated time set to 1:00 h
Actions #2

Updated by Brian Flanagan about 4 years ago

Apparently, the number of levels that will function in syntax highlighting are dependent on the content.
This example:

For x=1 To 31
    If x=1 or x=2 or x=3 or x=4 or x=5 or x=6 or x=7 or x=8 or x=9 or x=10 or x=11 or x=12 or x=13 or x=14 or x=15 or x=16 or x=17 or x=18 or x=19 or x=20 or x=21 or x=22 or x=23 or x=24 or x=25 or x=26 or x=27 or x=28 or x=29 or x=30 Then Print "YES";x, else Print "NO";x,
    If x=1 And x=2 And x=3 And x=4 And x=5 And x=6 And x=7 And x=8 And x=9 And x=10 And x=11 And x=12 And x=13 And x=14 And x=15 And x=16 And x=17 And x=18 And x=19 And x=20 And x=21 And x=22 And x=23 And x=24 And x=25 And x=26 And x=27 And x=28 And x=29 And x=30 Then Print "YES";x, else Print "NO";x,
Next x

... will highlight the first 19 levels, while the following example:

For x=1 to 31
    x$=Chr$(x)
    If x$=Chr$(1) or x$=Chr$(2) or x$=Chr$(3) or x$=Chr$(4) or x$=Chr$(5) or x$=Chr$(6) or x$=Chr$(7) or x$=Chr$(8) or x$=Chr$(9) or x$=Chr$(10) or x$=Chr$(11) or x$=Chr$(12) or x$=Chr$(13) or x$=Chr$(14) or x$=Chr$(15) or x$=Chr$(16) or x$=Chr$(17) or x$=Chr$(18) or x$=chr$(19) or x$=chr$(20) or x$=chr$(21) or x$=chr$(22) or x$=chr$(23) or x$=chr$(24) or x$=chr$(25) or x$=chr$(26) or x$=chr$(27) or x$=chr$(28) or x$=chr$(29) or x$=chr$(30) Then Print "YES";x, else Print "NO";x,
Next x

...will only highlight the first 14 levels.

Finally, this example:

For x=1 to 31
    x$=Chr$(x)+str$(x)
    If x$=Chr$(1)+str$(x) or x$=Chr$(2)+str$(x) or x$=Chr$(3)+str$(x) or x$=Chr$(4)+str$(x) or x$=Chr$(5)+str$(x) or x$=Chr$(6)+str$(x) or x$=Chr$(7)+str$(x) or x$=Chr$(8)+str$(x) or x$=Chr$(9)+str$(x) or x$=Chr$(10)+str$(x) or x$=Chr$(11)+str$(x) or x$=Chr$(12)+str$(x) or x$=Chr$(13)+str$(x) or x$=Chr$(14)+str$(x) or x$=Chr$(15)+str$(x) or x$=Chr$(16)+str$(x) or x$=Chr$(17)+str$(x) or x$=Chr$(18)+str$(x) or x$=chr$(19)+str$(x) or x$=chr$(20)+str$(x) or x$=chr$(21)+str$(x) or x$=chr$(22)+str$(x) or x$=chr$(23)+str$(x) or x$=chr$(24)+str$(x) or x$=chr$(25)+str$(x) or x$=chr$(26)+str$(x) or x$=chr$(27)+str$(x) or x$=chr$(28)+str$(x) or x$=chr$(29)+str$(x) or x$=chr$(30)+str$(x) Then Print "YES";x, else Print "NO";x,
Next x

...will only properly highlight the first 9 1/2 levels.

In all 3 cases, however the code functions properly.

Since this is not a functional issue, it has been marked low priority.

Actions #3

Updated by Brian Flanagan over 3 years ago

  • Status changed from New to Closed

Closing this ticket, since this is just a syntax highlighting error and not a functional error with and/or, etc.

As far as I can tell, statements remain functional through the maximum length of a line in the Editor.
(It is only the syntax highlighting that fails.)

For example, the following statement works properly with 48 usages of the "Or" operator, although the syntax highlighting stops after the 19th.

x=48
If x=0 Or x=1 Or x=2 Or x=3 Or x=4 Or x=5 Or x=6 Or x=7 Or x=8 Or x=9 Or x=10 Or x=11 Or x=12 Or x=13 Or x=14 Or x=15 Or x=16 Or x=17 Or x=18 Or x=19 Or x=20 Or x=21 Or x=22 Or x=23 Or x=24 Or x=25 Or x=26 Or x=27 Or x=28 Or x=29 Or x=30 or x=31 or x=32 or x=33 or x=34 or x=35 or x=36 or x=37 or x=38 or x=39 or x=40 or x=41 or x=42 or x=42 or x=43 or x=44 or x=45 or x=46 or x=47 or x=48 Then Print "Yes!"

There are other tickets addressing syntax highlighting limitations. http://aozmine.25.re/issues/680

Actions

Also available in: Atom PDF