Hi Christophe

You can use the "Character Map" windows tool to report on the ascii
values of your character set. On mine the degree symbol you want is 176
so in MapInfo this can be printed as chr$(176). If you open a MapBasic
window and type in print chr$(176) you will see your character in the
message window.

With regarding to writing to a file if you open with


dim lsString as string
Open File for output as #1

lsString = "19.4" + chr$(176)

write #1, lsString

you will get your character in the file.

Thus any character values will be written out ie from chr$(0) to
chr$(255). Hopefully this is what you want to do - perhaps the character
appearing in a report. 


If you want to read and write single bytes in a binary mode however 

ie Open File lsFile for binary access write as #1

I do not think MapBasic can do this. I would recommend writing C DLLs
that you link to MapBasic for writing binary files. You can write short,
long and double with MapBasic but MapInfo does not have a BYTE data
type. If you use fixed length strings ie dim lsFixed as string * 1 then
you are limited to printable characters chr$(32) to chr$(126). You can
not read or write variable length strings with MapBasic in binary mode.




Regards

Bob
www.MapsByDesign.co.uk




In message <[EMAIL PROTECTED]>,
Christophe Brabant <[EMAIL PROTECTED]> writes
>Hi
> 
>I would like to write this character : °
>into a text file, with Write statement for example.
> 
>Don't work if I use litteraly : Write #2 , "°"
>Don't know if i can use Chr$(), I don't find the right code number into
>ASCII table.
> 
>Christophe

-- 
bob young

---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 16870

Reply via email to