🔒 Locked
=
Advertisement
Original Post
In my Computer Science class last quarter and this quarter, people (including the professor) refer to the "=" operator as the "gets" character, as in "x gets 46." I prefer to just say "equals", but I guess "gets" reminds people not to confuse it with "==". I just refer to the "==" operator by saying "is equal to."
What do you guys prefer?
I''ve heard teachers say "is set equal to" (I used to tutor programming students), but everyone I know who''s a real programmer uses "equals."
[Resist Windows XP''s Invasive Production Activation Technology!]
[Resist Windows XP''s Invasive Production Activation Technology!]
x = 42;
x equals 42.
That''s just the way i think of it, particularly in algebra where this kind of terminology is vital to the abstraction of the algebraic process.
if x == 42
if x is equal to 42.
I look at == as just a specified version of <= and >= which are used in algebraic inequalities.
I don''t know. Maybe "x gets 42" is just a simpler way for students who aren''t mathematically oriented to understand a concept for something which they have no basis.
Paradigm Shift 2000
x equals 42.
That''s just the way i think of it, particularly in algebra where this kind of terminology is vital to the abstraction of the algebraic process.
if x == 42
if x is equal to 42.
I look at == as just a specified version of <= and >= which are used in algebraic inequalities.
I don''t know. Maybe "x gets 42" is just a simpler way for students who aren''t mathematically oriented to understand a concept for something which they have no basis.
Paradigm Shift 2000
I prefer "x is assigned 42". I''ve been working on a C++ tutorial, and I find a lot of newbies have trouble understanding why, in if(x == 42), the =''s are doubles up. Why not just one?
So I tend to refer to = as the assignment operator and == as the comparison operator. Easier to understand.
So I tend to refer to = as the assignment operator and == as the comparison operator. Easier to understand.
Hey! VB is da bomb! *ducks verbal assault*
I went from VB to C++ and for a while the = and == operands messed me up so bad cause I kept forgetting to do the == in if statements! AAAGH!
And btw the prof is weird
it''s "equals" and "is equal to", tally another for those.
Drew Sikora
A.K.A. Gaiiden
Blade Edge Software
Public Relations, Game Institute
Staff Member, GDNet
Online column - Design Corner at Pixelate
3-time Contributing author, Game Design Methods , Charles River Media (coming GDC 2002)
I went from VB to C++ and for a while the = and == operands messed me up so bad cause I kept forgetting to do the == in if statements! AAAGH!
And btw the prof is weird
Drew Sikora
A.K.A. Gaiiden
Blade Edge Software
Public Relations, Game Institute
Staff Member, GDNet
Online column - Design Corner at Pixelate
3-time Contributing author, Game Design Methods , Charles River Media (coming GDC 2002)
heh
Line delminators (sp?), Seperate set and comparison opperators for equals, argument brackety thinggies, etc
C++ is smooth
BTW, I forgot in my last post so put me down for "equals" and "is equal to".
gets just sounds stupid.
Line delminators (sp?), Seperate set and comparison opperators for equals, argument brackety thinggies, etc
C++ is smooth
BTW, I forgot in my last post so put me down for "equals" and "is equal to".
gets just sounds stupid.
I''ve experienced three Comp professors, and their choices are as follows:
Anal: "x gets 45"
Air headed: "you put the value of 45 into the memory address that is the integer x."
Comp Architecture prof.: "Set your cache buffer value to 101101, then assign your arguement pointer to the address of your variable in memory, then send the cache buffer value to the pointer address."
My conclusions?
x = 3: "x equals 3"
if (x == 3): "if x is equal to 3"
- God created the world in seven days? I think I can one-up him!
Anal: "x gets 45"
Air headed: "you put the value of 45 into the memory address that is the integer x."
Comp Architecture prof.: "Set your cache buffer value to 101101, then assign your arguement pointer to the address of your variable in memory, then send the cache buffer value to the pointer address."
My conclusions?
x = 3: "x equals 3"
if (x == 3): "if x is equal to 3"
- God created the world in seven days? I think I can one-up him!
quote:
I thought it was pritty funny the first time I saw VB that it used "=" on both occasions
At my work I mostly have to switch between coding Java servlets and ASP pages in VBScript. Man, I won''t even say how many times I''ve put ''=='' in an ASP page and ''='' in a servlet (not to mention I continually catch myself putting a '';'' at the end of my VBScript lines).
As for the origional poster, I say equals; in fact I''ve never heard anyone call it "gets".
"If consquences dictate our course of action, it doesn''t matter what''s right, it''s only wrong if you get caught."
- Tool
I prefer Eubonicode''s semantics:
on line 4, for example, a is set to 1.
a be 1 bitch.
lordy, lordy.
Eubonicode Homepage
|
on line 4, for example, a is set to 1.
a be 1 bitch.
lordy, lordy.
Eubonicode Homepage
quote:
Original post by Andrew Russell
I thought it was pritty funny the first time I saw VB that it used "=" on both occasions
But then again, who uses VB *ahem*nes8bit*ahem*I don''t believe it! Just Great!
Another server has gone!
son of a...
---------------------------------------------
My useless posts have been viewed
ROFL Mithrandir. DAMN that''s funny. :D
Shoot, I fell off my chair laughing so hard.
Paradigm Shift 2000
Shoot, I fell off my chair laughing so hard.
Paradigm Shift 2000
We see x = 23, and we know what it does. Why spell it out to ourselves? I don''t even try to translate it to english when I''m reading it.
But if I was dictating code to someone, I''d use "equals" and "is equal to".
But if I was dictating code to someone, I''d use "equals" and "is equal to".
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement
