|
From: | Cyril ADRIAN |
Subject: | Re: [Liberty-eiffel] Array with integers. real and strings |
Date: | Tue, 29 Mar 2016 12:08:00 +0200 |
Instead ofI made a little, dirty hack to TYPED_VARIANT to getOh, I forgot to tell Germán about to_externals, thanks, Cyril.As we speaking about VARIANT may you please give a quick glance at
https://github.com/tybor/Liberty/commit/09f9471d88568785c68e102ee50d0a561127ca7d ?
Got foobar
Got 38
Got 3.140000
Got Void
Got TYPED_VARIANT[STRING]#0x20f9128[]
Got TYPED_VARIANT[INTEGER_32]#0x20fd148[]
Got TYPED_VARIANT[REAL_64]#0x20ff158[]
Got TYPED_VARIANT[STRING]#0x20f9140[]as naïvely thought that people invoking VARIANT.out may find the former being a more terse representation of those VARIANTs instead of the latter.Do you think it may be desiderable?Thanks in advance2016-03-29 10:46 GMT+02:00 Cyril ADRIAN <address@hidden>:I agree. As for strings, you may use the `to_external` feature. It returns a pointer to the string's (null-terminated) storage area, i.e. a "char*" for C.Cheers,--2016-03-29 10:38 GMT+02:00 Paolo Redaelli <address@hidden>:Il 28/03/2016 21:32, Germán Arias ha scritto:
El lun, 28-03-2016 a las 10:38 +0200, Paolo Redaelli escribió:Can you give me the name of that function? (And an url of documentation if you don't mind )http://webserver2.tecgraf.puc-rio.br/iup/en/dlg/iupgetparam.htmlYou may use the $ operator which gives a POINTER to the address of an Eiffel feature, variable or so on. It's a normally seldom used feature of the language but when dealing with C you will use it more often.I will try it.
After a quick read of iupgetparam.html I think you definitifely need to use the $ operator to fill a NATIVE_ARRAY[POINTER]
[Prev in Thread] | Current Thread | [Next in Thread] |