Page 1 of 1
String Function - Syntax Error
Posted: Wed Feb 14, 2018 6:17 pm
by marlin55
I've just started writing my first program, and the statement H$="HELLO" gives a syntax error.
I've tried upper, case lower case, spaces around the = , but I just can't get it to work.
What am I doing wrong, please. Even if I comment that line out with an apostrophe I get a syntax error when I hit 'run' !
[Running on iPad Pro with ios 11.2.5]
Re: String Function - Syntax Error
Posted: Wed Feb 14, 2018 6:30 pm
by rbytes
in iOS 11, Apple introduced Smart Punctuation, thereby affecting many computer languages that relied on the standard apostrophe and quote marks. I'm sure they just wanted to make text output look nicer, but they overlooked the consequences for programmers!
Many of us were baffled by the syntax errors at first, but after becoming aware of the issue we have found several workarounds. The simplest is to go to Settings - General - Keyboard - Smart Punctuation and disable it. But if you like the look of the new characters better for your non-programming activities, you can leave Smart Punctuation on and still get the old characters for writing code. All you need to do is hold down either the apostrophe or quote key until a popup appears with variations of that character and slide your finger straight up to the choice directly above, then release.
In answering your question, I discovered that Apple had only recently changed the layouts in the keyboard popups again. A couple of months ago when I checked, the standard characters were not located directly above their related keys. So thankfully A have listened to the outcry from programmers/developers, and are trying to make it as easy as possible for us to enter the standard characters in our code.