Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 24, 2019 12:55:33 GMT -5
From a MACRO, when I "comment out a line", (which works fine), the AUTO colorization routines do not realize that the line has changed (ie commented out). Is there a way to force "colorization" to re-evaluate the contents and apply it's magic? Thanks
|
|
Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 24, 2019 15:05:29 GMT -5
Hmmm. My color AUTO (MACRO.AUTO) works great for MACROs and when typing a comment, it immediately recognizes the ' and changes the color to that I designated for comments. But using SPF_OVR_REP from a MACRO to place the ' for me, it places the ' but does not change the colorization. Same in a Rexx edit session using REX.AUTO. Colorization is great, but when inserting "/* */" , via MACRO, the /* and */ get placed correctly, but no changes in colorization.
|
|
Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 24, 2019 15:50:17 GMT -5
Not exactly what I had in mind but effective. (Too bad RELOAD can not be issued from an SPF_Cmd. ... another Post_DO to try with the next release.) What I was hoping for was a "REFRESH" colorization command, actually, I was expecting that when the MACRO inserted the ' that colorization would just automatically re-color. :-)
|
|
Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 24, 2019 16:55:39 GMT -5
Nope. But I do have another question. What is the Thin command for Datatype? Ie If Datatype(xxx) = "NUM" or "CHAR". Basic has a command: Num, which looks like it would work, but Thin has no Num command. It does have: Number, but it does not do what I need.
|
|
Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 24, 2019 20:19:29 GMT -5
Something like:
if Datatype(Get_Arg$(i)) = 'NUM' Then arg must be a column number logic End If If Datatype(GetArg$(i)) = 'CHAR' Then arg must be X or NX End If
Datatype, of course is the REXX implementation, The BASIC implementation, Num, is:
Arg1 = "123.45 Boolean = Num(Arg1) ;* returns 1, that is, True Arg2 = "Section 4" Boolean = Num(Arg2) ;* returns 0, that is, False Arg3 = " " Boolean = Num(Arg3) ;* False (space is not numeric) Arg4 = "" Boolean = Num(Arg4) ;* True (empty string is numeric)
Surprising that ThinBasic does not support Num. There must be an alternative.
|
|
Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 25, 2019 7:21:01 GMT -5
OK this will work:
Dim var as string Dim pad_char as String Value "#"
cc = IsLike(var, LSET$(pad_char, Len(var) USING pad_char) ,)
and will return 1 if var is numeric, and 0 if not
Long way around...
|
|
Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 25, 2019 8:28:02 GMT -5
Perfect. Thanks.
|
|
|
Post by George on Jun 25, 2019 15:15:42 GMT -5
Ren: Robert: I've added a call to AttrScan (which does the colorize scan) to the various Macro functions that modify the text data.
When V10 (I think) switched colorize away from being done at display time and did it at text load/modification time, these functions obviously got overlooked.
George
P.S. For Robert. I tested the multiple SPF_Post_Do(xxxx) commands and they seem to work as I expected, multiple ones are simply done, in order.
|
|
Ren
Sophomore Member
Retired Mainframer
Posts: 82
|
Post by Ren on Jun 25, 2019 15:21:51 GMT -5
Thanks George
|
|