Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Symbols using ASCII codes.
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Vorpal




PostPosted: Sun Dec 14, 2008 5:19 pm   Post subject: Symbols using ASCII codes.

I've been assigned a project and for additional marks have been asked to include a degree symbol, I've learned that this can be accomplished by holding alt and typing 0176 on the number pad, and it seems to work everywhere other than in Turing, am I doing something wrong?
Sponsor
Sponsor
Sponsor
sponsor
OneOffDriveByPoster




PostPosted: Sun Dec 14, 2008 5:31 pm   Post subject: Re: Symbols using ASCII codes.

Vorpal @ Sun Dec 14, 2008 5:19 pm wrote:
I've been assigned a project and for additional marks have been asked to include a degree symbol, I've learned that this can be accomplished by holding alt and typing 0176 on the number pad, and it seems to work everywhere other than in Turing, am I doing something wrong?
I suppose you can edit your source file elsewhere. You can also use chr(). The number for the degree symbol is probably dependent on the code page (likely Windows-1252). Take a look: http://en.wikipedia.org/wiki/Windows-1252.
DanielG




PostPosted: Sun Dec 14, 2008 5:43 pm   Post subject: Re: Symbols using ASCII codes.

176 is the ascii code of it, you need to use chr(176) to print it

code:

 put "5", chr(176)

the above is an example code that prints 5(degree symbol)
OneOffDriveByPoster




PostPosted: Fri Dec 19, 2008 10:44 am   Post subject: Re: Symbols using ASCII codes.

DanielG @ Sun Dec 14, 2008 5:43 pm wrote:
176 is the ascii code of it, you need to use chr(176) to print it

code:

 put "5", chr(176)

the above is an example code that prints 5(degree symbol)
The link I gave gives you 176 (yes). Also, there is no degree symbol in ASCII.
Euphoracle




PostPosted: Fri Dec 19, 2008 10:54 am   Post subject: RE:Symbols using ASCII codes.

Alternatively, you can draw a small circle using drawoval.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: