![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi, I'm setting out to replicate some parts of Psion programs that I wrote, using their version of Basic called "OPL".
Like in many languages a numeric constant could be set to a hexadecimal value by prefixing (with "$"). Is there an equivalent in Basic4PPC? (I cannot find it in Help.) (Since I am doing binary serial data transfer with a Garmin GPS, see Psion programming projects, it would be particularly pertinent.) Cheers, Mike. |
|
||||
|
There is no hexadecimal notation in Basic4ppc.
It will be probably added in a future version. You can use Bitwise.HexToDec to convert hexadecimal strings to numbers (at runtime). |
|
|||
|
Thanks Erel, I think that the addition of a hex notation would be a Good Thing.
In fact since I want a byte array initialised with hex values, HexToDec() (which returns a single number) is not really what I want. A version of StringToBytes() that copes with hex notation as well as doing the type coercion would be nearer the mark. Similarly it is sometimes convenient to display a buffer's content as a string of hex characters, requiring the converse function. Best regards, Mike. |
|
|||
|
Thank you Andrew, I shall certainly have a play with that.
Also because it may help me to resolve a persistent problem that I am having with this serial program of mine. While I can exchange text characters OK, even if I receive them as binary, if I try to send and receive binary the bytes do not come out as I expect... Regards, Mike. |
|
||||
|
Release quality BytesConverter library now available in ByteConverter library
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| color constants slightly off their readback value | colin9876 | Bug Reports | 6 | 12-11-2007 07:26 PM |