LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-12-2012, 02:09 PM   #1
hololeap
LQ Newbie
 
Registered: Oct 2011
Location: Colorado, USA
Distribution: Gentoo, Ubuntu
Posts: 13

Rep: Reputation: Disabled
Dollar sign in coding


I am from the United States, so I never gave it much thought until now, but I was wondering if the use of the dollar sign ($) in so many programming languages bothers people from other countries. It must feel odd, just like if I were inserting the Yen sign (¥) into my code constantly.
 
Old 02-12-2012, 02:49 PM   #2
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 852

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Hmm... It doesn't bother me. Most programming languages (all I know actually) are based on English so it doesn't seem so odd there. I don't usually even think of it as a DOLLAR sign, but rather a 'value' sign because that's more or less its meaning in most programming languages I've seen. I actually encountered this symbol in the context of programming much sooner than as a symbol of USD ( I didn't have much interest in economy when I was 8 ). Actually I used to wonder why the americans chose to use 'that programming character' as a symbol for their currency (history was never one of my talents either). I have been seeing '$' in programs for so long that it doesn't seem odd to me at all.
 
Old 02-12-2012, 03:41 PM   #3
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by millgates View Post
I don't usually even think of it as a DOLLAR sign, but rather a 'value' sign because that's more or less its meaning in most programming languages I've seen.
I learned to program on the Commodore 64, Microsoft Basic V2. In that language the $-symbol was used to declare a variable as a string variable. Since then I never think of dollars when I see it in program code.
 
Old 02-12-2012, 04:36 PM   #4
millgates
Member
 
Registered: Feb 2009
Location: 192.168.x.x
Distribution: Slackware
Posts: 852

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by TobiSGD View Post
I learned to program on the Commodore 64, Microsoft Basic V2. In that language the $-symbol was used to declare a variable as a string variable. Since then I never think of dollars when I see it in program code.
Hmmmm, BASIC... My first programming experience was BASIC on ZX Spectrum. Had a lot of fun with that. Then I started with pascal, which I didn't like after my previous exposure to BASIC (I mean, you don't number your statements in pascal?!? How do you tell goto where the loop begins?). My BASIC programs kinda looked like those Dungeons & Dragons kind of books (If you rolled 16 go to page 138).
I don't even remember what meaning the dollar sign had there. I actually don't remember anything about BASIC. I guess my mind just blocked those memories to protect itself or something... The only thing remaining is those freaky, creepy flashbacks I see whenever I eat spaghetti.

Last edited by millgates; 02-12-2012 at 04:38 PM.
 
Old 02-12-2012, 04:42 PM   #5
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by millgates View Post
I mean, you don't number your statements in pascal?!? How do you tell goto where the loop begins?
Exactly what I thought when I saw a friend on his Amiga coding in Amiga Basic (I think that was what it was called). Gave me serious problems when I later tried to port a program to my Atari ST with Omicron Basic.
 
Old 02-12-2012, 05:28 PM   #6
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 244Reputation: 244Reputation: 244
Me either, I don't think of $ as dollar sign in programming, same with @, when I declare array in perl script like @my_array, I don't think I am sending email to my_array host
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Access filename with dollar sign and single quote ldsfdls Linux - General 3 10-18-2011 02:58 PM
[SOLVED] can't use ($) dollar sign in string ... php/fi 2.0.1 Linux Chips Programming 5 07-18-2011 09:37 AM
zsh PS1, dollar sign in the beginning, why? Mr. Alex Linux - Newbie 1 01-25-2011 09:48 AM
[SOLVED] Dollar sign in zsh Mr. Alex Linux - Newbie 3 01-24-2011 10:48 AM
Making grep find files containing '$' (the dollar sign char). stf92 Linux - Newbie 9 12-08-2010 11:16 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:49 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration