syntax for depth of if-then-do loops?

General questions about using TextPad

Moderators: AmigoJack, bbadmin, helios, MudGuard

Post Reply
greendonuts
Posts: 3
Joined: Tue Apr 27, 2004 7:11 pm

syntax for depth of if-then-do loops?

Post by greendonuts »

Hi. Does anyone have syntax for .sas (or anything else) that I can use to tell the depth of a do-loop? Sort of like MS-Excel has colored parentheses that match so you can tell how many you have to enter on each side of your expression, I'd like some colored text to show the deepest level of do-loop, or something like that. I have been assigned the task of decoding someone's old .sas files, and they just loved nested nested nested do loops.

Thank you.
User avatar
s_reynisson
Posts: 939
Joined: Tue May 06, 2003 1:59 pm

Post by s_reynisson »

Not sure if this is what you are looking for but did you take a look at the add-ons here? http://www.textpad.com/add-ons/synn2t.html

Code: Select all

SAS (1)  Syntax definitions for SAS. 
Contributed by Jared Schettler  
SAS (2)  Alternative syntax definitions for SAS. 
Contributed by James Hoffman, 2 October 2000  
SAS (3)  Syntax definitions for SAS. 
Original contribution by Jared Schettler, updated by Charlie Mills, 12 August 2003.  
Also note that in TP you can always press Ctrl-M to match a bracket, if you don't like Ctrl-M you can asssign a diffrent keyboard shortcut from Configure->Preferences->Keyboard. HTH
Then I open up and see
the person fumbling here is me
a different way to be
greendonuts
Posts: 3
Joined: Tue Apr 27, 2004 7:11 pm

syntax for depth of if-then-do loops?

Post by greendonuts »

Thanks, yes, I checked all the sas add-ins.
User avatar
talleyrand
Posts: 624
Joined: Mon Jul 21, 2003 6:56 pm
Location: Kansas City, MO, USA
Contact:

Post by talleyrand »

Not that it'll help with color coding but if there are brackets (haven't seen SAS so I don't know), Ctrl-M will match them. Worst case scenario, people on here have put brackets or braces in comments and used them to match structures.

while true #(
#stuff in here
#more stuff
end while #)
I choose to fight with a sack of angry cats.
greendonuts
Posts: 3
Joined: Tue Apr 27, 2004 7:11 pm

syntax for depth of if-then-do loops?

Post by greendonuts »

Talleyrand - Hilarious sig :o
Thanks very much. I find this intriguing. I know nothing, nothing about textpad coding; is this example part of the syntax-file language? Where would I find more examples of structure matching?

talleyrand wrote:Not that it'll help with color coding but if there are brackets (haven't seen SAS so I don't know), Ctrl-M will match them. Worst case scenario, people on here have put brackets or braces in comments and used them to match structures.

while true #(
#stuff in here
#more stuff
end while #)
Post Reply