A huge work..
Thank you very much Giovani!
HMG Tutorial Was born
Moderator: Rathinagiri
- zolysoftsolutions
- Posts: 139
- Joined: Wed Feb 29, 2012 3:33 am
- Location: Gyulakuta, Erdélyország
- Contact:
Re: HMG Tutorial Was born
_______________________________
Open eyes for you!
Open eyes for you!
Re: HMG Tutorial Was born
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"
Logical keys are not allowed? Am I right? Has abybody more experiences with this?
Last edited by mol on Tue Dec 08, 2015 7:19 am, edited 1 time in total.
-
- Posts: 245
- Joined: Sat Aug 02, 2008 5:03 pm
Re: HMG Tutorial Was born
Hi Mol,I got an compiler error.
Logical keys are not allowed? I'm right? Has abybody more experiences with this?
I think you need to search in harbour sources/samples for hb_hash()
Code: Select all
to define hash:
myHash := { "item1"=> .T. ,;
"item2" => 1234 ,;
"item3" => date() }
setting another value
myHash[ "item1" ] := .F.
Regards/Saludos, Carlos (bcd12a)
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: HMG Tutorial Was born
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?
Has been made correction in VivaClipper page :
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.
Viva INTERNATIONAL HMG