generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

do you usually use " or ' for strings

Previous Thread :: Next Thread 
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
05 Jul 2015 08:01 AM
?


ily2beb
Report Abuse
Fribet is not online. Fribet
Joined: 08 Feb 2014
Total Posts: 700
05 Jul 2015 08:02 AM
Both work.
Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
05 Jul 2015 08:04 AM
ik, just curious as to what your preference is.


ily2beb
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
05 Jul 2015 08:05 AM
I like using ' for the forums as it is more easier to reach.

I like using " in scripting because it looks better in my code for some reason (and makes it longer which makes me proud-er). :3

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
Codythescriptmaster is not online. Codythescriptmaster
Joined: 08 May 2012
Total Posts: 189
05 Jul 2015 08:07 AM
If you want to have a string like this : "He said "HI"", you cant do that because the quotations. Instead, you do 'He said "HI"'. If you want the ' in the string, use quotations
Report Abuse
BreaktheSilence is not online. BreaktheSilence
Joined: 13 Jan 2011
Total Posts: 599
05 Jul 2015 08:20 AM
I pretty much started with Java so I like " better for strings and ' for characters, but after using web languages like javascript and php I could be using either without realising :P
Report Abuse
ganger800 is not online. ganger800
Joined: 06 Dec 2012
Total Posts: 427
05 Jul 2015 08:21 AM
I use " " because I also know other program languages (for example C)
and there is a difference between " and '

"" is a string which contains 0 or more characters and a end character
'' is a single character

since Lua doesn't really care about one or more characters, it doesn't matter here
however I use it this way too in Lua, so I can easily switch between languages
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
05 Jul 2015 08:21 AM
99% of the time I use '' a lot more comfortable. I remember, when my laptop keys weren't working (some of them) I couldn't use quotation marks and then I found out somewhere that u can use '' so I asked on the Scripters Forum and they said they're both equal (in their functionality, not '==") so I started using '' and decided it was a LOT more comfortable to reach so I just used it all the time...

"My Life is going Good... but..."
Report Abuse
Jeysea is not online. Jeysea
Joined: 13 Apr 2015
Total Posts: 268
05 Jul 2015 08:23 AM
You can do "I'm James "Jim" Baker" by doing:

"I'm James \"Jim\" Baker"
Report Abuse
gergy008 is not online. gergy008
Joined: 16 Mar 2008
Total Posts: 7039
05 Jul 2015 08:24 AM
I generally always use "", even though I could just use '' to print quotation marks, I prefer to escape them with \ just... because I'm used to it.

I'm an advanced PHP developer, and I generally use '' exclusively, that's because PHP parses '' faster than "" because in PHP, you can put variables directly into strings. In PHP I'll concat with . rather than putting the variable in the string because it looks cleaner.

$apple = "Apple"

echo('$apple') //Result: $apple
echo("$apple") //Result: Apple


Play now! ~ http://www.roblox.com/games/refer?PlaceId=2047642
Report Abuse
Darkmist101 is not online. Darkmist101
Joined: 30 Jul 2010
Total Posts: 6208
05 Jul 2015 08:24 AM
[[I'm James Jim Baker]] works too.
Report Abuse
Kapitanovas is not online. Kapitanovas
Joined: 09 Sep 2012
Total Posts: 4216
05 Jul 2015 08:30 AM
hehe... I generally use [[]] for Script.Source...

"My Life is going Good... but..."
Report Abuse
Froast is not online. Froast
Joined: 12 Mar 2009
Total Posts: 3134
05 Jul 2015 08:32 AM
generally use '

in php where there is actually a different i use ' unless i want a variable in my string
Report Abuse
Emeraldite is not online. Emeraldite
Joined: 08 Mar 2015
Total Posts: 1246
05 Jul 2015 08:33 AM
I normally use ' because it makes my code look shorter, and more efficient. I can read it better, and that pleases me.


hurhurhurhur O_o
Report Abuse
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
05 Jul 2015 08:35 AM
It doesn't make it more efficient.

Enjoying your stay at the Scripters Forum? Join this! http://www.roblox.com/My/Groups.aspx?gid=2582784
Report Abuse
Emeraldite is not online. Emeraldite
Joined: 08 Mar 2015
Total Posts: 1246
05 Jul 2015 08:36 AM
@Power

I know that.
It just looks neater.


hurhurhurhur O_o
Report Abuse
BothAngles is not online. BothAngles
Joined: 01 Dec 2011
Total Posts: 9604
05 Jul 2015 08:42 AM
Always "
Report Abuse
Isosta is not online. Isosta
Joined: 10 May 2015
Total Posts: 14729
05 Jul 2015 09:31 AM
I use ' because it's easier to reach. On occasion if I'm writing something that will displaying text to users and I need a ' like that's, then I'll use ". Otherwise, always '


ily2beb
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image