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,

