Open Brace with nested "if" doesn't work

Syntax highlighting, code folding, brace matching, code indenting, and function list

Open Brace with nested "if" doesn't work

Postby uweholst » Thu Jul 28, 2005 8:58 am

Hi,

I'm testing software with Ratonal Robot (SQA = basic dialect). In my wordfile I have

open brace strings ... "If" "Select Case" For"
close brace strings.... "End If" "End Select" "Next"

This works fine, as long I do not have nested statements like:

Code: Select all
      If   bla Then
           If blu Then
              do something
           Else If
              do something
           End If 
      Else If
           If blu Then
              do something
           Else If
              do something
           End If 
      End If


The matching "End If" for the first If is not found. Is there any posibility to get that to work?

Thanks
User avatar
uweholst
Newbie
 
Posts: 1
Joined: Fri Mar 25, 2005 12:00 am

Re: Open Brace with nested "if" doesn't work

Postby Mofi » Mon Jul 17, 2006 9:20 am

The problem here is that the word "If" is also a word in "End If" and in "Else If". UltraEdit cannot know that the "If" in "End If" and "Else If" should be ignored. The only solution I have found is following:

/Open Brace Strings = "Then" "Select Case" For"
/Close Brace Strings = "End If" "End Select" "Next"

Well, not really good, but better than nothing. It's always bad if a language is based on identifier terms and not on identifier words.
User avatar
Mofi
Grand Master
Grand Master
 
Posts: 4056
Joined: Thu Jul 29, 2004 11:00 pm
Location: Vienna


Return to Syntax Highlighting