Re: HMG Tutorial Was born
Posted: Wed Sep 03, 2014 7:03 pm
A huge work..
Thank you very much Giovani!
Thank you very much Giovani!
Exclusive forum for HMG, a Free / Open Source xBase WIN32/64 Bits / GUI Development System
http://www.hmgforum.com/
I tried to use associative array to translate logical vaue:esgici wrote:mol wrote:.. known an way to test if index of associative array is defined?...You can found details here.Code: Select all
? HB_HPOS( hMyHash, 'NotFoundIndex') // --> 0
Code: Select all
aYesNo := {=>}
aYesNo[ .f. ] := "No"
aYesNo[ .t. ] := "Yes"
Hi Mol,I got an compiler error.
Logical keys are not allowed? I'm right? Has abybody more experiences with this?
Code: Select all
to define hash:
myHash := { "item1"=> .T. ,;
"item2" => 1234 ,;
"item3" => date() }
setting another value
myHash[ "item1" ] := .F.
Thanks Marek, you are rightmol wrote: I tried to use associative array to translate logical vaue:I got an compiler error.Code: Select all
aYesNo := {=>} aYesNo[ .f. ] := "No" aYesNo[ .t. ] := "Yes"
Logical keys are not allowed? I'm right? Has abybody more experiences with this?
Viva HMGTyping :
<key> part of a hash may be any legal scalar type : C, D, L, N ...
Correction : This definition is wrong ! The correct is :
<key> entry key; can be of type: number, date, datetime, string, pointer.
Corrected at : 2015.12.08; thanks to Marek.