long unsigned
[1/4] from: maarten::koopmans::surfnet::nl at: 17-Jun-2002 15:42
Hi I am *trying* to send a string formatted like this:
%lu %lu %ld \n
in C-style printf format over a tcp connection.
However.... the long unsigneds give always the same (strange) value on
the server (which is a binary for me).
How can I get the unsigneds correctly over the wire?
--Maarten
--
Maarten Koopmans
Innovation manager tel: +31 30 2 305 324
Surfnet BV fax: +31 30 2 305 329
P.O.Box 19035 email: [maarten--koopmans--surfnet--nl]
NL-3501 DA Utrecht http://www.surfnet.nl
The netherlands
[2/4] from: anton:lexicon at: 18-Jun-2002 20:22
I think you hit the bit limit of a
signed integer in rebol? Rebol has no
unsigned integer as far as I remember.
Here's a few suggestions:
1) Send formatted as long signed, then get rebol
to convert to decimal! on the server.
2) Send formatted as float or double.
What is the "strange" value server receives?
Anton.
[3/4] from: joel:neely:fedex at: 18-Jun-2002 6:01
Hi, Maarten,
Maarten Koopmans wrote:
> Hi I am *trying* to send a string formatted like this:
>
> "%lu %lu %ld \n" in C-style printf format over a tcp connection.
>
> However.... the long unsigneds give always the same (strange)
> value on the server (which is a binary for me).
>
> How can I get the unsigneds correctly over the wire?
>
What is the strange value? Are you sure you're in range for
REBOL integers (-2147483648 <= value <= 2147483647)?
-jn-
--
; Joel Neely joeldotneelyatfedexdotcom
REBOL [] do [ do func [s] [ foreach [a b] s [prin b] ] sort/skip
do function [s] [t] [ t: "" foreach [a b] s [repend t [b a]] t ] {
| e s m!zauafBpcvekexEohthjJakwLrngohOqrlryRnsctdtiub} 2 ]
[4/4] from: maarten:koopmans:surfnet:nl at: 18-Jun-2002 14:06
It turned out the protocol I am doing is implented in strings, so no
problems anymore...
--maarten
Anton wrote:
> I think you hit the bit limit of a
> signed integer in rebol? Rebol has no
<<quoted lines omitted: 16>>
>>--Maarten
>>
--
Maarten Koopmans
Innovation manager tel: +31 30 2 305 324
Surfnet BV fax: +31 30 2 305 329
P.O.Box 19035 email: [maarten--koopmans--surfnet--nl]
NL-3501 DA Utrecht http://www.surfnet.nl
The netherlands
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted