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

Username:   Password: 
 RegisterRegister   
 Turing ALT-Commands or Special Characters
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Jyoshua




PostPosted: Fri Oct 10, 2008 6:19 pm   Post subject: Turing ALT-Commands or Special Characters

Real basic question...

I am currently working on MUD like game
for my Computer Science class... Also I
love RPGs so I actually care enough to go
all out...

I think I was told how to but I forget and I
don't want to waste my 3-day weekend so
how is it you can use special characters or
ALT-Commands in a put statement?

i.e.
I want to do:

put "█"

but if I try to do the ALT-Command or even
copy and paste it comes out like this... ??

put "?"
Sponsor
Sponsor
Sponsor
sponsor
Euphoracle




PostPosted: Fri Oct 10, 2008 6:29 pm   Post subject: RE:Turing ALT-Commands or Special Characters

I don't believe Turing supports extended ascii. I think you might have to do it using the Draw. procedures, unless someone else knows a way to get it to work.
Jyoshua




PostPosted: Fri Oct 10, 2008 6:33 pm   Post subject: Re: Turing ALT-Commands or Special Characters

Perhaps I could substitute
the current font with a
manually made one...
Still anything else easier
would be appreciated ...

Very Happy Please help lmao
Dan




PostPosted: Fri Oct 10, 2008 6:48 pm   Post subject: RE:Turing ALT-Commands or Special Characters

1st of all why are you trying to output an "ALT-Command"?

If it is that you want some charcater that is not on the keyboard like ?, ? or ? (or any other extended ASCII char) you should be using the chr command with the ascii code.

For example if you want ? you would do:

put chr(135)

For a list of ascii codes see http://www.ascii-code.com/


Unfrontly tho, thess chars are not the same as you will get with the ALT-some numbers in windows like ╝ or ╗ and as far as i know turing does not support thoes so you will either get an error or a ? if you try to put them in ""s


Edit: It seems compsci.ca does not support the extended ASCII chars i was using in the example, however turing does support them and you should be able to use any of the chars on the ascii-code.com site in turing.
Computer Science Canada Help with programming in C, C++, Java, PHP, Ruby, Turing, VB and more!
[Gandalf]




PostPosted: Fri Oct 10, 2008 6:50 pm   Post subject: RE:Turing ALT-Commands or Special Characters

Characters are a tricky thing, so I'm not sure what exactly you mean to display. However, from what I can tell, you're trying to accomplish such:
Turing:
setscreen("msdos")
put chr(219)
Jyoshua




PostPosted: Fri Oct 10, 2008 6:51 pm   Post subject: Re: Turing ALT-Commands or Special Characters

Dude that's what I was trying to remember Very Happy
Thank you so much!!
[Gandalf]




PostPosted: Fri Oct 10, 2008 6:52 pm   Post subject: Re: Turing ALT-Commands or Special Characters

No problem! Welcome to CompSci.ca. Cool
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  [ 7 Posts ]
Jump to:   


Style:  
Search: