hi,
huiyi_ch wrote: ↑Thu Jan 16, 2020 9:28 am
Please add the following structure:
Code: Select all
SWITCH expr
CASE value
[EXIT]
...
OTHERWISE
ENDSWITCH
i have try SWITCH Syntax
it fail when have this
Code: Select all
STATIC FUNCTION MySmile( nType )
IF HB_ISNUMERIC( nType )
SWITCH nType
CASE 1 ; RETURN ":)"
CASE 2 ; RETURN ";)"
CASE 3 ; RETURN "*SMILE*"
ENDSWITCH
ENDIF
RETURN NIL
but it work when have this
Code: Select all
STATIC FUNCTION MySmile( nType )
IF HB_ISNUMERIC( nType )
SWITCH nType
CASE 1
RETURN ":)"
CASE 2
RETURN ";)"
CASE 3
RETURN "*SMILE*"
ENDSWITCH
ENDIF
RETURN NIL
result is not nice while i got this
Code: Select all
IF HB_ISNUMERIC( nType )
SWITCH nType
CASE 1
RETURN ":)"
CASE 2
RETURN ";)"
CASE 3
RETURN "*SMILE*"
ENDSWITCH
ENDIF
RETURN NIL
you see that it don't intend CASE "1" ... but it does compile/link right and do not give Error when using CLICK
i have deeper look for SWITCH and it is different to DEFINE which have a 2nd "fix" Parameter.
same with "Begin ini xxx" and "END Ini" which must be "ENDIni" is to short with 3 Sign ... better 4 Sign
if we get SWITCH with "fix" Parameter like "NTYP","CTYP","NFOR" ... than we can use it with CLICK Logic
---
my 1st Try was to search "DO CASE" but i didn't find a Way to Indent CASE "1" when using SWITCH
my Advice : if you want to use CLICK get rid of SWITCH and go back to Basic and use Clipper Syntax DO CASE
hm ... "might" be possible while use 2 x Words "WITH OBJECT"... but ...
as i know "WITH" it a the "Keyword" under Cl*pper and i'm not sure how CLICK will "understand" when a Line begin with "WITH"
that is include but you have to use this Syntax
Code: Select all
CLASS xxx
EXPORTED:
METHOD ABC
ENDCLASS
METHOD xxx:ABC
...
RETURN
this is CLASSY Syntax which Xbase++ use too.
it will write Header into CLASS Code but no Cross-Reference like Function/Procedure
it Code does NOT work well
Code: Select all
INLINE METHOD
INLINE CLASS METHOD
INLINE ACCESS CLASS METHOD
INLINE ASSIGN ACCESS METHOD
---
CLICK is a Cl*pper Code Formatter and i want to add HMG xCommad SYNTAX used by FMG***.
i found out that it work with HMG / FMG while i have a "Start" with "DEFINE abcd" and "End" with "ENDabcd".
i "just" had to find out "where" to put "Start" and "End" to increase / decrease Counter for Intend left / right
but i can't use CLICK e.g with FiveWin while there is no "ENDabcd" ... and also FoxPro Code will not work well with CLICK.
it is still the old Cl*pper Code so we have to go back to Basic Cl*pper Syntax which still work when we want to use CLICK.
if someone find out how to enhance Code for "new Syntax" feel free to modify Code which i prepare to release.
please write about Result in "this" Forum ... i don't like Google Forum, thx
***i use "modify" FMG in MiniGUI and "that" Syntax work too with CLICK
to use CLICK with MinGUI i recommend to write all "C"-Code into a Extra *.PRG