BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
ManitobaMoose
Quartz | Level 8

My program didn't work because I had smart quotes instead of simple quotes. What is the difference? Thanks!

 

Here is a response from another anwered post:

 

The code you posted will not run.

This line

Value = spedis(Name,‘Friedman’) ;

has "smart quotes", the curly version instead of a simple '

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

PDF and WORD use smart quotes. They are not recognized by programs as valid characters. They 'look' better.

 

from the oracle known as Google:

Smart quotes,” the correct quotation marks and apostrophes, are curly or sloped. "Dumb quotes," or straightquotes, are a vestigial constraint from typewriters when using one key for two different marks helped save space on a keyboard.

 

EDIT: If you paste code in word it tends to automatically format them to smart quotes. So if you copy and paste code - which is not a good way to learn programming because your brain doesn't actually process what's being copied - you'll end up with this issue. Typing out the code line by line forces your brain to wonder, why the heck is there a semicolon here? Or why is there a set of commas back to back? You'll miss those details when copying and pasting. If you're just learning a language I highly recommend you type out the commands at first.

View solution in original post

2 REPLIES 2
Reeza
Super User

PDF and WORD use smart quotes. They are not recognized by programs as valid characters. They 'look' better.

 

from the oracle known as Google:

Smart quotes,” the correct quotation marks and apostrophes, are curly or sloped. "Dumb quotes," or straightquotes, are a vestigial constraint from typewriters when using one key for two different marks helped save space on a keyboard.

 

EDIT: If you paste code in word it tends to automatically format them to smart quotes. So if you copy and paste code - which is not a good way to learn programming because your brain doesn't actually process what's being copied - you'll end up with this issue. Typing out the code line by line forces your brain to wonder, why the heck is there a semicolon here? Or why is there a set of commas back to back? You'll miss those details when copying and pasting. If you're just learning a language I highly recommend you type out the commands at first.

ChrisHemedinger
Community Manager

I'm not a fan of smart quotes, which is why I turn them off in Word (and by extension, in MS Outlook which respects the same preferences).  You'll find the setting in Word, File->Options, Proofing tab, then click AutoCorrect.

 

sq.png

 

This affects only those quotes that you type, not those that you copy/paste from somewhere else.  PDF and Word docs are notorious for smart quote contamination.

It's time to register for SAS Innovate! Join your SAS user peers in Las Vegas on April 16-19 2024.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 3387 views
  • 3 likes
  • 3 in conversation