Re: Definition of terms
- Posted by Dan B Moyer <DANMOYER at PRODIGY.NET> Sep 03, 2000
- 403 views
Thomas: A constant is just like a variable, in that it can be assigned a value by the programmer, but once assigned, it can't be changed like other variables can: constant pi = 3.141529 ---------------------------------- A procedure is a named routine which accomplishes some task; whenever you call it by putting its name in your main line of code, it activates the routine: procedure Add(integer a, integer b) print(1, a + b) end procedure -- to use it: Add(1,1)-- screen shows "2" ------------------------------------- A function is a named routine which returns a value when called: function Added(integer a, integer b) return a + b end function -- now use it: x = Added(3,4)-- x would be 7 ---------------------------------------------------- As for your last question, "Also, I'd like to know what the difference between " and ' is.", you'll have to finish it first! :) HTH, Dan ----- Original Message ----- From: "Paul Kerslake" <paulk at UNISERVE.COM> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Sunday, September 03, 2000 5:42 PM Subject: Definition of terms Can someone tell me and give me an example of; a constant, a procedure and a function. Also, I'd like to know what the difference between " and ' is. 8-) puts(1,"Thanks") --Thomas