The definition looks like this (like [formatting])
This are only the tokes, functional are a little bit more will be handled :-)
; V = Verb
; V1 = GrobGruppe (-=Leer,#=Precompiler,C=Code)
; V3 = Klammerungsflag (B=Begin,E=End,M=Middle)
; V5 = VerbGruppe
;
; IG: Einrückgruppe
; +1 -> B= 0,A= +1 ; Eins einrücken nach dem Statement
; -1 -> B= -1,A= 0 ; Eins ausrücken vor dem Statement
; ±1 -> B= -1,A= +1 ; Vorher eins ausrücken, Nachher wieder eins einrücken
; 01 -> B=1000,A= +1 ; Statment bei 0, danach eins einrücken
; 10 -> B=1000,A=1000 ; Statment bei 0, danach bei 0 weiter (von eins kommend)
; 0R -> B=1000,A=2000 ; Statment bei 0, danach wie vorher weiter
; ±N -> Um IA einrücken,dann wieder um IB raus
; ULC=Uppercase (U=Uppercase,L=Lowercase,""=unverändert)
; SEP=Separator (T=JA,F=Nein,""=unverändert)
; LIT=Literal
; DSC=Description
$VD_LST$=""
putitem/id $VD_LST$,"-" ,"V=-·;V1=-·;IG=0R·;DSC=Leerzeile"
putitem/id $VD_LST$,";1" ,"V=;1·;V1=;·;IG=0R"
putitem/id $VD_LST$,";N" ,"V=;N·;V1=;"
putitem/id $VD_LST$,"@1" ,"V=@1·;V1=@·;IG=0R"
putitem/id $VD_LST$,"@N" ,"V=@N·;V1=@"
putitem/id $VD_LST$,"@+" ,"V=@+·;V1=@"
#if (1=1)
putitem/id $VD_LST$,"#IF" ,"V=#IF·;V1=#·;V3=B·;IG=+1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#IFDEFINED" ,"V=#IFDEFINED·;V1=#·;V3=B·;IG=+1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#IFUNDEFINED" ,"V=#IFUNDEFINED·;V1=#·;V3=B·;IG=+1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ELSEIF" ,"V=#ELSEIF·;V1=#·;V3=M·;IG=±1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ELSE" ,"V=#ELSE·;V1=#·;V3=M·;IG=±1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ENDIF" ,"V=#ENDIF·;V1=#·;V3=E·;IG=-1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#FOR" ,"V=#FOR·;V1=#·;V3=B·;IG=+1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ENDFOR" ,"V=#ENDFOR·;V1=#·;V3=E·;IG=-1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#DEFINE" ,"V=#DEFINE·;V1=#·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#UNDEFINE" ,"V=#UNDEFINE·;V1=#·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#INCLUDE" ,"V=#INCLUDE·;V1=#·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#INFO" ,"V=#INFO·;V1=#·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#WARNING" ,"V=#WARNING·;V1=#·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ERROR" ,"V=#ERROR·;V1=#·;ULC=L·;SEP=T"
#else
putitem/id $VD_LST$,"#IF" ,"V=#IF·;V1=#·;V3=B·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#IFDEFINED" ,"V=#IFDEFINED·;V1=#·;V3=B·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#IFUNDEFINED" ,"V=#IFUNDEFINED·;V1=#·;V3=B·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ELSEIF" ,"V=#ELSEIF·;V1=#·;V3=M·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ELSE" ,"V=#ELSE·;V1=#·;V3=M·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ENDIF" ,"V=#ENDIF·;V1=#·;V3=E·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#FOR" ,"V=#FOR·;V1=#·;V3=B·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ENDFOR" ,"V=#ENDFOR·;V1=#·;V3=E·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#DEFINE" ,"V=#DEFINE·;V1=#·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#UNDEFINE" ,"V=#UNDEFINE·;V1=#·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#INCLUDE" ,"V=#INCLUDE·;V1=#·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#INFO" ,"V=#INFO·;V1=#·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#WARNING" ,"V=#WARNING·;V1=#·;IG=0R·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"#ERROR" ,"V=#ERROR·;V1=#·;IG=0R·;ULC=L·;SEP=T"
#endif
putitem/id $VD_LST$,"GOTO" ,"V=GOTO·;V1=C·;V5=G*"
putitem/id $VD_LST$,"*GOTO_TAG" ,"V=*GOTO_TAG·;V1=C·;V5=G*"
putitem/id $VD_LST$,"*DY_ENTRY" ,"V=*DY_ENTRY·;V1=C·;V3=B·;V5=E*·;IG=01"
putitem/id $VD_LST$,"ENTRY" ,"V=ENTRY·;V1=C·;V3=B·;V5=E*·;IG=01·;ULC=U·;SEP=T"
putitem/id $VD_LST$,"OPERATION" ,"V=OPERATION·;V1=C·;V3=B·;V5=E*·;IG=01·;ULC=U·;SEP=T"
putitem/id $VD_LST$,"OPER_PUBLIC" ,"V=public OPERATION·;V1=C·;V3=B·;V5=E*·;IG=01·;ULC=U·;SEP=T"
putitem/id $VD_LST$,"OPER_PARTNER" ,"V=partner OPERATION·;V1=C·;V3=B·;V5=E*·;IG=01·;ULC=U·;SEP=T"
putitem/id $VD_LST$,"TRIGGER" ,"V=TRIGGER·;V1=C·;V3=B·;V5=E*·;IG=01·;ULC=U·;SEP=T"
putitem/id $VD_LST$,"END" ,"V=END·;V1=C·;V3=E·;V5=E*·;IG=10·;ULC=U·;SEP=T"
putitem/id $VD_LST$,"PARAMS" ,"V=PARAMS·;V1=C·;V3=B·;V5=P*·;IG=+1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"ENDPARAMS" ,"V=ENDPARAMS·;V1=C·;V3=E·;V5=P*·;IG=-1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"VARIABLES" ,"V=VARIABLES·;V1=C·;V3=B·;V5=V*·;IG=+1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"ENDVARIABLES" ,"V=ENDVARIABLES·;V1=C·;V3=E·;V5=V*·;IG=-1·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"WHILE_INL" ,"V=WHILE_INL·;V1=C·;LIT=WHILE·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"WHILE" ,"V=WHILE·;V1=C·;V3=B·;V5=W*·;IG=+1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"ENDWHILE" ,"V=ENDWHILE·;V1=C·;V3=E·;V5=W*·;IG=-1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"REPEAT" ,"V=REPEAT·;V1=C·;V3=B·;V5=R*·;IG=+1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"UNTIL" ,"V=UNTIL·;V1=C·;V3=E·;V5=R*·;IG=-1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"FOR" ,"V=FOR·;V1=C·;V3=B·;V5=F*·;IG=+1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"FORENTITY" ,"V=FORENTITY·;V1=C·;V3=B·;V5=F*·;IG=+1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"FORLIST" ,"V=FORLIST·;V1=C·;V3=B·;V5=F*·;IG=+1·;ULC=1"
putitem/id $VD_LST$,"ENDFOR" ,"V=ENDFOR·;V1=C·;V3=E·;V5=F*·;IG=-1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"IF_INL" ,"V=IF_INL·;V1=C·;LIT=IF·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"IF" ,"V=IF·;V1=C·;V3=B·;V5=I*·;IG=+1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"ELSE" ,"V=ELSE·;V1=C·;V3=M·;V5=I*·;IG=±1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"ELSEIF" ,"V=ELSEIF·;V1=C·;V3=M·;V5=I*·;IG=±1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"ENDIF" ,"V=ENDIF·;V1=C·;V3=E·;V5=I*·;IG=-1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"SELECTCASE" ,"V=SELECTCASE·;V1=C·;V3=B·;V5=S*·;IG=+1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"CASE" ,"V=CASE·;V1=C·;V3=M·;V5=S*·;IG=±1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"ELSECASE" ,"V=ELSECASE·;V1=C·;V3=M·;V5=S*·;IG=±1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"ENDSELECTCASE" ,"V=ENDSELECTCASE·;V1=C·;V3=E·;V5=S*·;IG=-1·;ULC=1·;SEP=1"
putitem/id $VD_LST$,"BREAK" ,"V=BREAK·;V1=C·;ULC=U"
putitem/id $VD_LST$,"CALL" ,"V=CALL·;V1=C·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"RUN" ,"V=RUN·;V1=C·;ULC=L·;SEP=S"
putitem/id $VD_LST$,"ACTIVATE" ,"V=ACTIVATE·;V1=C·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"RETURN" ,"V=RETURN·;V1=C·;ULC=U·;SEP=F"
putitem/id $VD_LST$,"DONE" ,"V=DONE·;V1=C·;ULC=L"
putitem/id $VD_LST$,"NEWINSTANCE" ,"V=NEWINSTANCE·;V1=C·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"DELETEINSTANCE" ,"V=DELETEINSTANCE·;V1=C·;ULC=L·;SEP=T"
putitem/id $VD_LST$,"PUTITEM" ,"V=PUTITEM·;V1=C·;ULC=L"
putitem/id $VD_LST$,"GETITEM" ,"V=GETITEM·;V1=C·;ULC=L"
putitem/id $VD_LST$,"DELITEM" ,"V=DELITEM·;V1=C·;ULC=L"
putitem/id $VD_LST$,"SETOCC" ,"V=SETOCC·;V1=C"
putitem/id $VD_LST$,"REMOCC" ,"V=REMOCC·;V1=C"
putitem/id $VD_LST$,"CREOCC" ,"V=CREOCC·;V1=C"
putitem/id $VD_LST$,"DISCARD" ,"V=DISCARD·;V1=C"
putitem/id $VD_LST$,"CLEAR" ,"V=CLEAR·;V1=C"
putitem/id $VD_LST$,"SORT" ,"V=SORT·;V1=C"
putitem/id $VD_LST$,"RETRIEVE" ,"V=RETRIEVE·;V1=C"
putitem/id $VD_LST$,"READ" ,"V=READ·;V1=C"
putitem/id $VD_LST$,"WRITE" ,"V=WRITE·;V1=C"
putitem/id $VD_LST$,"DELETE" ,"V=DELETE·;V1=C"
putitem/id $VD_LST$,"SCAN" ,"V=SCAN·;V1=C"
putitem/id $VD_LST$,"LENGTH" ,"V=LENGTH·;V1=C"
putitem/id $VD_LST$,"MESSAGE" ,"V=MESSAGE·;V1=C"
putitem/id $VD_LST$,"ASKMESS" ,"V=ASKMESS·;V1=C"
putitem/id $VD_LST$,"STRING" ,"V=STRING·;V1=C"
putitem/id $VD_LST$,"NUMERIC" ,"V=NUMERIC·;V1=C"
putitem/id $VD_LST$,"BOOLEAN" ,"V=BOOLEAN·;V1=C"
putitem/id $VD_LST$,"DATE" ,"V=DATE·;V1=C"
putitem/id $VD_LST$,"*VAR" ,"V=*VAR·;V1=C"
putitem/id $VD_LST$,"*BLOCK_TAG" ,"V=*BLOCK_TAG·;V1=C"
putitem/id $VD_LST$,"*LET" ,"V=*LET·;V1=C"
putitem/id $VD_LST$,"*STMT" ,"V=*STMT·;V1=C"
putitem/id $VD_LST$,"*CONT" ,"V=*CONT·;V1=C·;IG=±1N"
------------------------------
Ingo Stiller
Aareon Deutschland GmbH
------------------------------
Original Message:
Sent: 06-05-2024 07:33
From: Ingo Stiller
Subject: Formating proc code: how?
Hi Iain
Exactly: "IF(" does not work :-)
I wrote a prettifier long time ago which can handle all UnifAce-statements and more .
The preprocessor directives will also handled.
And if you say: #-statements will not be ident.
Only problem with my solution:
It is slow 'cause it is completly written in UnifAce itself. Handling of strings is so slow :-)
Ingo
------------------------------
Ingo Stiller
Aareon Deutschland GmbH
Original Message:
Sent: 06-05-2024 07:18
From: Iain Sharp
Subject: Formating proc code: how?
Hi Ingo,
I already have a bug logged that whilst it correctly indents if and while statements where they are "if (" or "while (", it doesn't indent them properly if they are "if(" and "while(".
This may lead to it appearing to be madness at the moment on the formatting.
The 'workaround' is to find/replace "if(" with "if (" and while( with "while (" and then format. Which does help recover from the madness if you have lots of text in the editor.
BTW I discovered it also does indent #for (I don't think it should)
Regards,
Iain
------------------------------
Iain Sharp
Head of Technical Services
Pci Systems Ltd
Sheffield GB
Original Message:
Sent: 06-05-2024 07:03
From: Ingo Stiller
Subject: Formating proc code: how?
Hi Jonke
Found that settings and got also the menu running :-)
BTW:First test and the formating is already going a little crazy. Have to check whether this is a setting problem or a real issue :-)
Ingo
------------------------------
Ingo Stiller
Aareon Deutschland GmbH
Original Message:
Sent: 06-05-2024 06:24
From: Jonke Korzelius
Subject: Formating proc code: how?
From the looks of this you are not using the correct 4GL in your setup.
[userkeys] is where the shortcut key combinations are defined and can be changed if you want.
[formatting] can be used to tweak your formatting rules.
Both are not needed per se to bring up the menu options...
------------------------------
Jonke Korzelius
Developer
Rocket Internal - All Brands
NL
Original Message:
Sent: 06-04-2024 09:46
From: Ingo Stiller
Subject: Formating proc code: how?
Hi Freaks
Now that the biggest obstacles have been cleared away, I can take a closer look at the newer UnifAce versions.
And I found this "10.4.02.045 :Feature: Format ProcScript, indentation corrections on entire code document"
But how to activate?
I'm selection a few line of code and use right mouse click:
Not a single hint about formatting.
I have also added the [userkeys] to our INI and USYS.INI: Nothing happens.
What else needs to be activated for the formatting to work?
BTW:
I did upgrade UnifAce 10.4.2.0-018 to UnifAce 10.4.2.0-49 but just simple copying the UnifAce-Patch
TIA Ingo
------------------------------
Ingo Stiller
Aareon Deutschland GmbH
------------------------------