MedVision ad

algorithms (1 Viewer)

crammy90

Member
Joined
Mar 26, 2006
Messages
264
Gender
Male
HSC
2008
when we get user input and we need to assign its value to a variable do we do:
get user input
variable = user_input
or do we just do
variable = user input
or is it
variable = user_input
yeh lol...
 

Terlob

Member
Joined
May 6, 2007
Messages
164
Location
Wagga Wagga
Gender
Male
HSC
2008
crammy90 said:
when we get user input and we need to assign its value to a variable do we do:
get user input
variable = user_input
or do we just do
variable = user input
or is it
variable = user_input
yeh lol...
I think you would be ok with any of those, although I'd use
HTML:
get user_input
variable = user_input
 

Casper_18

Member
Joined
Mar 4, 2009
Messages
39
Gender
Male
HSC
2009
All of them are acceptable except variable= user input. Because in most languages the spce in a variable name is illegal.
 

spoonbender

Member
Joined
Mar 1, 2007
Messages
91
Gender
Male
HSC
2009
Would this be acceptable?

Set variable to user input

and if I do that, would I need to go "variable = user input" or "get user input" as well?
 

zvyx

Member
Joined
Aug 10, 2006
Messages
95
Location
NSW
Gender
Male
HSC
2008
wow this is like a really minute detail...
Set x to user input works fine; algorithms are meant to show logic, and it's clear that you want the user to specify the value of x (replace x with w.e. name, but as said, do avoid spaces in variable names)

If you want to be careful, perhaps Set x to user input via keyboard will be enough. But yeh; nothing really big there. If my teacher marked me down on that I would really be going to town with it.
 

spoonbender

Member
Joined
Mar 1, 2007
Messages
91
Gender
Male
HSC
2009
Haha, I'm all about details XD I should be worrying about the massive amount of theory there is to learn instead of stuff like this, eh? Well thanks for that :D
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Top