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

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




PostPosted: Sat Jun 07, 2003 3:34 pm   Post subject: Procedures

Ive seen procedures wher you can put brackets after.

IE textGreen ("My green text")

the procedure can take something after it and alter it. How is this done and could sum1 explain what all the things mean. It would help me alot. I'm trying to write a program with ALERT boxes, so when I go

alert ("my alert message here")

it displays it in a box with an OK button.
Sponsor
Sponsor
Sponsor
sponsor
bugzpodder




PostPosted: Sat Jun 07, 2003 3:41 pm   Post subject: (No subject)

in the future versions of turing, all you have to do is GUI.Alert
Andy




PostPosted: Sat Jun 07, 2003 5:39 pm   Post subject: (No subject)

jack i think he's asking about how parameters work
when you have a procedure followed by the brackets, the procedure is given parameters, inorder to run the procedure, you have to input data into it.
code:

proc word(word:string)
put word
end word

in the above code, inorder to run the procedure word, a string have to be inserted in to the procedure. to run the procedure you'll have to do this
code:

put word("hi")


in the procedure, word is a constant and cannot be changed, inorder to change it, you'll have to put a var infront of it

code:

proc increase(var num:int)
num+=1
end increse


This increases the variable you put in the procedure by 1

code:

var number:string:=2
increase(number)
put number

the output will be 2
Homer_simpson




PostPosted: Sat Jun 07, 2003 9:06 pm   Post subject: (No subject)

it doesn't work... for some reason GUI.Alert doesn't work or at least on my computer...=/
Andy




PostPosted: Sat Jun 07, 2003 9:10 pm   Post subject: (No subject)

ya it doesn't work
stupid holt soft ppl
Mephi




PostPosted: Sat Jun 07, 2003 10:51 pm   Post subject: (No subject)

is proc the same as procedure?
Homer_simpson




PostPosted: Sat Jun 07, 2003 11:05 pm   Post subject: (No subject)

but u could create a custom one by opening a window giving a message and putting a gui button in the middle if u really need to use it...=/
void




PostPosted: Sun Jun 08, 2003 10:49 am   Post subject: (No subject)

i think so..ive never seen any difference in the way the function...
Andy




PostPosted: Sun Jun 08, 2003 12:59 pm   Post subject: (No subject)

ya proc is the same as procedure just as fcn is the same as function
AsianSensation




PostPosted: Sun Jun 08, 2003 6:51 pm   Post subject: (No subject)

is there one for process, what about short form for other commands?
Andy




PostPosted: Sun Jun 08, 2003 7:24 pm   Post subject: (No subject)

meng, ur so damn lazy, how many processes do u have?
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  [ 11 Posts ]
Jump to:   


Style:  
Search: