Hello Mahmoud et ALL
Attached it the GUI version of RingFmt.ring
- RingFmt-GUI.ring
- code-1.c.ring
The original code is ALL intact.
Added a few "addText( sData) for output to the TextEdit Box in the original code.
USAGE:
Go-Dialog
Select 1 file ring file
Formats it.
Go-Directory
Enter the * Pattern to match fileNames: Ex. code-2* , *.ring etc
It will bring up a Directory Dialog.
Click on "Select Directory" OR change Directory.
Formats all ring files that the match Pattern in the name.
Params:
Chose parameter using dropdown list
Class
Indent
Output
FIXED for readability - the Arithmetic Ops added
RingFmt.ring
c = b-a
plus = a+b
SEE "Data: "+A+"abc"+"++"+B+nl
RingFmt-Gui.ring
c = b - a
plus = a + b
SEE "Data: " + A + "abc" + "++" + B + nl
Question:
The cTabChars = Tab - - 8 spaces -- which seems too much.
How can it be set to 4 spaces
func getTabChars
cTabChars = Tab // 8 spaces
switch cIndentation
on :spaces
cTabChars = Copy(" ",8)
==============================
OUTPUT