Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2011-10

Unicode function names

4 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Mark Morgan Lloyd

Out of curiosity, I've just tried creating a function named ⍳ (Unicode character 2373, i.e. the APL iota function). FPC trunk complains

Fatal: illegal character "'�'" ($E2)

What is the rule here- functions must be entirely ANSI or functions must start with ANSI?

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]
Unknown author
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote 7 lines
Out of curiosity, I've just tried creating a function named ⍳ (Unicode character 2373, i.e. the APL iota function). FPC trunk complains Fatal: illegal character "'???'" ($E2) What is the rule here- functions must be entirely ANSI or functions must start with ANSI?

To my knowledge FPC does not support non-ascii identifiers ? Only a-z, 0-9 and _ are allowed.

Michael.

Sven Barth
to Unknown author

Am 20.10.2011 10:04, schrieb

Show quoted text 14 lines
On Thu, 20 Oct 2011, Mark Morgan Lloyd wrote: > Out of curiosity, I've just tried creating a function named ⍳ (Unicode > character 2373, i.e. the APL iota function). FPC trunk complains > > Fatal: illegal character "'???'" ($E2) > > What is the rule here- functions must be entirely ANSI or functions > must start with ANSI? To my knowledge FPC does not support non-ascii identifiers ? Only a-z, 0-9 and _ are allowed.

Yes, Michael is right. Only the ASCII characters a-z, A-Z, 0-9 and _ are allowed. There was no change in FPC what identifiers it understands. I personally wouldn't mind if that stay ASCII...

Regards,
Sven

Mark Morgan Lloyd
to Sven Barth
Sven Barth wrote 19 lines
Am 20.10.2011 10:04, schrieb > > > On Thu, 20 Oct 2011, Mark Morgan Lloyd wrote: > >> Out of curiosity, I've just tried creating a function named ⍳ (Unicode >> character 2373, i.e. the APL iota function). FPC trunk complains >> >> Fatal: illegal character "'???'" ($E2) >> >> What is the rule here- functions must be entirely ANSI or functions >> must start with ANSI? > > To my knowledge FPC does not support non-ascii identifiers ? > Only a-z, 0-9 and _ are allowed. Yes, Michael is right. Only the ASCII characters a-z, A-Z, 0-9 and _ are allowed. There was no change in FPC what identifiers it understands. I personally wouldn't mind if that stay ASCII...

I agree, I was only experimenting on a whim. I think possibly that error message could be improved though, since by the time it was output it had been translated to a "I don't know what this is" blob and even the numeric representation was lost.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]