Page 1 of 1
"Strong Type" Variable
Posted: Sat May 23, 2020 4:07 am
by AUGE_OHR
hi
in Source of MiniGUI Extended Version i found this Syntax
Code: Select all
LOCAL cOldLine AS STRING
LOCAL lResp AS LOGICAL
LOCAL nLine AS NUMERIC
LOCAL aControlS1 AS Array
so harbour / HMG can use "Strong Type" for Variable
what Type is
are there any Sample with "compare" Speed of "Strong Type" Variable
Re: "Strong Type" Variable
Posted: Sun May 24, 2020 5:01 am
by AUGE_OHR
hi,
i found c:\MiniGUI\SAMPLES\Advanced\StronglyTypedVars\demo.prg
it seems me to "check" Type of Variable and will fail when mismatch.
i have try
Code: Select all
PUBLIC cImage
CHECK TYPE SOFT ;
cImage AS CHARACTER ,;
xxx
and got Error
CHECK TYPE ( Param # 1 ) : cImage is declared as CHARACTER but it is of type LOGICAL. Program terminated
... hm ... after change to
it does start Code without Error.
but when run that Modul it seems not to "change Speed".
do i use it wrong Way
is it just to "check" Type of Variable or are they real used
p.s. i use HMG not Extended Version
Re: "Strong Type" Variable
Posted: Wed Jul 01, 2020 6:41 pm
by srvet_claudio
Re: "Strong Type" Variable
Posted: Wed Jul 01, 2020 7:22 pm
by AUGE_OHR
hi Claudio,
thx for Answer.
when read i "think" it is "just" to check Type of Variable,
i have hope Code "run" faster when using strong Type
greetings by OHR
Jimmy