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

Username:   Password: 
 RegisterRegister   
 constants
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
y1234yy




PostPosted: Sun Mar 15, 2009 1:14 pm   Post subject: constants

Hi

I am having some trouble with constants. Do the values of constants have to be number or can it also be a string?

I am trying to output this, but turing said that "Hi" is not declared.

const x := Hi
put x

Am I using the const function wrong?
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun Mar 15, 2009 1:20 pm   Post subject: RE:constants

I think you are looking for
Turing:

const x : string := "Hi"
put x
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
y1234yy




PostPosted: Sun Mar 15, 2009 1:23 pm   Post subject: Re: constants

oh right, you need the quotations

Thanks for remind me Very Happy
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  [ 3 Posts ]
Jump to:   


Style:  
Search: