prg code function documentor in HMG

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

huiyi_ch
Posts: 114
Joined: Sat May 21, 2016 5:27 am
Has thanked: 2 times
Been thanked: 13 times

Re: prg code function documentor in HMG

Post by huiyi_ch » Thu Jan 16, 2020 9:28 am

Hi AUGE_OHR
Please add the following structure:

Begin ini xxx
......
END Ini

SWITCH expr
CASE value
[EXIT]
...
OTHERWISE
ENDSWITCH

WITH OBJECT expression
...
ENDWITH

CLASS xxx
...
ENDCLASS

User avatar
AUGE_OHR
Posts: 444
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 48 times
Been thanked: 92 times

Post by AUGE_OHR » Thu Jan 16, 2020 6:06 pm

huiyi_ch wrote:
Thu Jan 16, 2020 9:28 am
Hi AUGE_OHR
Please add the following structure:

Code: Select all

 Begin ini xxx   
    ......
 END Ini

 SWITCH expr
        CASE value
          [EXIT] 
        ... 
        OTHERWISE 
ENDSWITCH
huiyi_ch wrote:
Thu Jan 16, 2020 9:28 am

Code: Select all

WITH OBJECT expression
         ...
ENDWITH

CLASS xxx
     ...
ENDCLASS
sorry, that is NOT Classy Syntax so it is not include in Clipper.
you have to re-write your Code to Classy Syntax than you can use CLASS Code with CLICK.
have fun
Jimmy

huiyi_ch
Posts: 114
Joined: Sat May 21, 2016 5:27 am
Has thanked: 2 times
Been thanked: 13 times

Post by huiyi_ch » Fri Jan 17, 2020 2:50 am

Hi AUGE_OHR
Can you add a choice to the main interface that supports HARBOUR extension syntax?This preserves both CLIPPER's classic syntax and HARBOUR's extended syntax.

User avatar
AUGE_OHR
Posts: 444
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 48 times
Been thanked: 92 times

Post by AUGE_OHR » Fri Jan 17, 2020 6:13 am

hi,
huiyi_ch wrote:
Thu Jan 16, 2020 9:28 am
Please add the following structure:

Code: Select all

Begin ini xxx   
    ......
END Ini

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
huiyi_ch wrote:
Thu Jan 16, 2020 9:28 am

Code: Select all

WITH OBJECT expression
         ...
ENDWITH
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" :roll:
huiyi_ch wrote:
Thu Jan 16, 2020 9:28 am

Code: Select all

CLASS xxx
     ...
ENDCLASS
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
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 444
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 48 times
Been thanked: 92 times

Post by AUGE_OHR » Fri Jan 17, 2020 6:27 am

hi,
huiyi_ch wrote:
Fri Jan 17, 2020 2:50 am
Can you add a choice to the main interface that supports HARBOUR extension syntax?
This preserves both CLIPPER's classic syntax and HARBOUR's extended syntax.
i'm simple not able to extend CLICK for "other" than Cl*pper or Xbase++ OOP Syntax.

as i say my Concept with DEFINE xxx work while 2nd "fix" Parameter xxx is also in "ENDxxx"
for other Syntax without "Start" / "End" i have no Idea :idea:

perhaps you have a Idea. please report your Result in "this" Forum, thx
have fun
Jimmy

RPC
Posts: 144
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF
Has thanked: 41 times
Been thanked: 8 times

Post by RPC » Fri Jan 17, 2020 9:50 am

AUGE_OHR wrote:
Tue Jan 14, 2020 7:15 pm
RPC wrote:
Tue Jan 14, 2020 7:49 am

Code: Select all

   START PRINTPAGE 
   ...
   END PRINTPAGE
Aha ...this i have oversee.ok i will fix it
Hi AUGE_OHR
I tried ver 25 . Now I don't get error regarding clickout directory.
However the error regarding START PRINTPAGE ... END PRINTPAGE still exsits. :(

User avatar
AUGE_OHR
Posts: 444
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 48 times
Been thanked: 92 times

Post by AUGE_OHR » Fri Jan 17, 2020 8:42 pm

RPC wrote:
Fri Jan 17, 2020 9:50 am
However the error regarding START PRINTPAGE ... END PRINTPAGE still exsits. :(
uuuups ... i have enhance Code for DEFINE PRINTPAGE.

as it is not DEFINE i have to look "where" to place

Code: Select all

START PRINTDOC 
   START PRINTPAGE
   END PRINTPAGE
END PRINTDOC
not sure if i can fix it until Sunday
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 444
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 48 times
Been thanked: 92 times

Post by AUGE_OHR » Fri Jan 17, 2020 11:41 pm

hi,

have found Solution for START PRINTDOC / START PRINTPAGE :D
hb_CLICK_EXE26.zip
(1.58 MiB) Downloaded 7 times
as it have 2 x Word i can use same Concept like DEFINE so i only have to add 2 x Variable for Intend
btw. DEFINE and START Indent are "fix" on Space(3) ... i have to enhance CLICK.INI to include it.

so this is now last Call so fix something in CLICK for HMG and Extendet Version.

p.s. does new Icon of CLICK appear on your PC :?:
on some PC Icon was not updated so i have to clean Windows Icon Cache
Last edited by AUGE_OHR on Sat Jan 18, 2020 2:20 am, edited 1 time in total.
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 444
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 48 times
Been thanked: 92 times

Post by AUGE_OHR » Sat Jan 18, 2020 12:08 am

hi

while search for sample with START PRINTxxx i found some *.RMG
it contain Syntax like

Code: Select all

BEGIN LAYOUT
BEGIN HEADER
BEGIN TEXT
BEGIN LINE
BEGIN FOOTER

BEGIN DATA 
BEGIN DETAIL
BEGIN SUMMARY
BEGIN GROUP
BEGIN GROUPHEADER
BEGIN GROUPFOOTER
BEGIN RECTANGLE
Question : does someone use those REPORT Syntax without *.RMG :?:

so it is the same as BEGIN INI where i had Problem to find a Concept ...
have fun
Jimmy

User avatar
AUGE_OHR
Posts: 444
Joined: Sun Aug 25, 2019 3:12 pm
DBs Used: DBF, PostgreSQL, MySQL, SQLite
Location: Hamburg, Germany
Has thanked: 48 times
Been thanked: 92 times

Post by AUGE_OHR » Sat Jan 18, 2020 5:57 am

hi,

when using ";" to break line the "last" might be "lost" :shock:

this will produce wrong Code where "end" and "return" are missing :!:

Code: Select all

IF a=b ; blabla ; end
IF a=b ; blbla  ; return
and also this Syntax

Code: Select all

  xVar := a+b+c;
          +d+e+f
while this work with ";"

Code: Select all

  xVar := a+b+c+;
          d+e+f
so it must be a "+" before ";" to work correct with CLICK

Error will NOT warn by CLICK ... if fail on compile / link :!:
have fun
Jimmy

Post Reply