String Function - Syntax Error

Post Reply
marlin55
Posts: 15
Joined: Wed Feb 14, 2018 4:00 pm
My devices: iPad Pro + Windows PC
Flag: Great Britain

String Function - Syntax Error

Post 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]

User avatar
rbytes
Posts: 1338
Joined: Sun May 31, 2015 12:11 am
My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet
Location: Calgary, Canada
Flag: Canada
Contact:

Re: String Function - Syntax Error

Post 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. 8-)
The only thing that gets me down is gravity...

Post Reply