Another Suggestion (Was: My Bits are Flipping (or, "Why Can't I Be=

new topic     » topic index » view thread      » older message » newer message

>From: Travis Beaty <eucoder at travisbeaty.us>
>Reply-To: EUforum at topica.com
>To: EUforum at topica.com
>Subject: My Bits are Flipping (or, "Why Can't I Be Negative?")
>Date: Fri, 27 Aug 2004 08:08:37 -0500
>
>Hello all!
>
>How can I get this value, coming in from the C++ code side, to be seen by
>Euphoria as a negative number?  Or am I going to have to check the signed=
=20
>bit
>manually?
>
>Any help would be greatly appreciated!
>

    Unfotunately, parameters are only interpreted one way. Wouldn't it be=
=20
nice if you could do something like this:=20
call_back({routine_id("MouseCallback"), {C_INT, C_DOUBLE, C_DOUBLE},=20
C_DOUBLE})  --{mouse button, x-position, y-position} return: I don't know,=
=20
but something that needed to be a double. We wouldn't need to use any weird=
=20
workarounds for signed numbers, or strange stuff for doubles/floats.=20
Obviously, this would be quite complicated to implement. As it stands, the=
=20
interpreter just needs to copy a set of routines depending on how many=20
parameters there are for the callback. It would probably need some nice=20
assembler or C trickery to get this advanced method to work. With this=20
somewhat more complex method, though, we could create call-back procedures,=
=20
too (something that's moderately annoying.)

>
>Travis.
>

~[ WingZone ]~
http://wingzone.tripod.com/

s=20
to offer.=20
http://join.msn.com/?pgmarket=en-ca&page=byoa/prem&xAPID=1994&DI=10=
34&SU=http://hotmail.com/enca&HL=Market_MSNIS_Taglines=20
  Start enjoying all the benefits of MSN=AE Premium right now and get the=
=20
first two months FREE*.

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu