Assigning Hex number

David McFarlane mcfarla9 at msu.edu
Fri Feb 24 18:13:53 UTC 2012


Just a bit of clarification for those who don't go back to the days 
of BASIC on Apple II and Commodore 64:  The "%" in

     Const MYPORT% = &H4000

is a type-declaration character that declares the constant MYPORT as 
type Integer.  In newer dialects you can achieve the same effect with

     Const MYPORT as Integer = &H4000

depending on your own programming style.

-- David McFarlane


At 2/11/2012 07:44 PM Saturday, Paul Groot wrote:
>Hi S,
>
>If the address is static throughout the experiment, you could simply
>declare a constant in the global user section:
>
>Const MYPORT% = &H4000
>
>You can then use MYPORT anywhere in your inline scripts.
>
>
>xyz.OnsetSignalEnabled= True
>xyz.OnsetSignalPort= MYPORT
>xyz.OnsetSignalData= 25
>
>The conversion to CInt is never required since the hex-value is
>already interpreted as integer value.
>
>cheers
>Paul

-- 
You received this message because you are subscribed to the Google Groups "E-Prime" group.
To post to this group, send email to e-prime at googlegroups.com.
To unsubscribe from this group, send email to e-prime+unsubscribe at googlegroups.com.
For more options, visit this group at http://groups.google.com/group/e-prime?hl=en.



More information about the Eprime mailing list