cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Warning : Careful when copying relations from e-mails

KenFarley
21-Topaz I

Warning : Careful when copying relations from e-mails

Just had a perplexing experience where I sent some Creo relations code to a colleague, something simple, but it triggered a bunch of inexplicable error messages. The code was this:

txtResult = “VALUE IS “
IF numFloating < 1.0
  txtResult = txtResult + “0.”
ELSE
  txtResult = txtResult + ITOS ( floor ( numFloating ) ) + “.”
ENDIF
txtResult = txtResult + EXTRACT ( ITOS ( 1000 * ( 1 + numFloating – floor ( numFloating ) ) ), 2, 3 )

I couldn't figure out what in the world was going on. It's the kind of code I use all the time.

Turns out that when I e-mailed the text, Outlook, in it's annoying fashion, converted the quotes around the strings in the code to the two different quotes one would use if this text were being published in a book. If you look closely at the text, it is easy to see once you know it is there. What should have been

"0."

has been converted to

“0.”

which causes errors.

Just a warning for anyone who is using relations,

3 REPLIES 3
Dale_Rosema
23-Emerald III
(To:KenFarley)

Are the open and closed quotes the ones needed for the relation to work correctly?

 

I noticed in the first line you have (2) open quotes and (0) closed quotes.

The problem I was having was because Outlook was "fixing" my text by switching the actual quotes I had, the <shift>-<Key next to Enter> to the shown open and close quotes, which, to be honest, I don't know how to type on a keyboard. That's why I said "which causes errors" after the converted text.

Patriot_1776
22-Sapphire II
(To:KenFarley)

'Sup Ken!

 

Yeah, I'm not the greatest relation programmer for sure, but I've seen that as well.  Probably best to make anything like that a plain text file (Notepad), and add the file as an attachment in Outlook, that way it's not compromised.

Top Tags