I am NEW to GitHub, I have just spent a lot time trying to figure out how mark this repository as Clarion code, no luck yet.
Regardless, years ago I took the code from Text Formatter chapter in Software Tools in Pascal by Kernighan & Plaugher and converted that to Clarion. I needed to implement a letter writer that could format paragraphs from a letter type file and then substitute variable names with data. I also needed to format text in specific size boxes that could be placed on a printed form.
The ReadMe.md file on GitHub shows how to run an example that displays in a message box.
Hopefully at some point I find the settings for specifying language on GitHub,
Include the generated CLW files (TxtFo*.Clw) which CLW extension is seen as Clarion which APP is not.
They are nice in the Repo so we can see what the code does without having to open the APP and generate. They are also helpful if someone does build the APP they can compare their generated CLW’s to yours to see if there are template differences. Also include other generated files like INC,EXP,…
Its also good to create a TXA of the APP and put that on GitHub. The TXA usually can be loaded into older versions where the APP would be rejected. If you have a DCT also export and include a DCTX.
Example of the School APP on GitHub with the TXA, CLW, INC files:
So. . .AI directions for some GitHub stuff need human help. Found .gitattributes and also language is configured automatically, which is why adding .clw files works.
Thanks for the link. I don’t have the book, borrowed it in the 80’s and have photocopy of the text formatting chapter. Myself and long time friend did a lot of Pascal. Since you have the book you have the documentation for the Clarion code to format text. Some years later Alan Holub (Dr. Dobb’s) had his version of nroff (NR written in C) for sale. I bought that and used it to create a reporting system where I could automatically float columns of data horizontally across, for a DNA/Blood typing laboratory. This code was way-to-overkill to use for Clarion solution.
A tip is since at least Clarion 4 the Procedure Prototype and Parameters can be the same with both as (TYPE Label). The makes it easier you can type the Prototype then copy/paste into Parameters … except no Return type on the end.
I mostly like this because in the Embeditor at the top your Parameters shows Types so I know its a *STRING and LONG.
Actual example, note Return of “BOOL,PROC” is not in Parameters. The Default =FALSE can be in Parameters, but the actual value used is from the Prototype.
One other tip is the Prototype and Parameters can have different Labels. In the Prototype I’ll put more verbose labels that are more like documentation, this shows in the Intellisense popup. In the Parameters I’ll put more terse variables that I want in code. E.g.
MAP
FormatText(*STRING InTextToFormat, LONG SizeOfInText)
FormatText PROCEDURE(*STRING pTxt, LONG pLengthTxt)