Tue Dec 18, 2018 1:22 pm
Login Register Lost Password? Contact Us


UNICODE beginning a Field Name

Questions around writing code and queries

Mon Jul 24, 2017 3:10 pm Change Time Zone

When I do this:
Code: Select all
UNSIGNED2 UNICODE_FIXED_LENGTH := 10;
OUTPUT (UNICODE_FIXED_LENGTH);

It does not compile.
Error: syntax error near "UNICODE_FIXED_LENGTH" : expected datarow, identifier, pattern-name, action, pattern (1, 11), 3002,
Error: syntax error near "UNICODE_FIXED_LENGTH" : expected < (2, 9), 3002,

When I do this:
Code: Select all
UNSIGNED2 FIXED_UNICODE_LENGTH := 10;
OUTPUT (FIXED_UNICODE_LENGTH);

It does compile.

When I do this:
Code: Select all
UNSIGNED2 String_FIXED_LENGTH := 10;
OUTPUT (String_FIXED_LENGTH);

It does compile.

So I guess there is some rule you can't start a field name with UNICODE?
georgeb2d
 
Posts: 93
Joined: Wed Dec 24, 2014 3:36 pm

Mon Jul 24, 2017 4:47 pm Change Time Zone

Hi Don,

Perhaps it is not intentional. Please enter this as an issue and the compiler team can investigate.

Regards,

Bob
bforeman
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 978
Joined: Wed Jun 29, 2011 7:13 pm

Mon Jul 24, 2017 5:53 pm Change Time Zone

It looks like the compiler thinks you are using the form UNICODE_locale.

for example:
Code: Select all
UNICODE_de5 MyUnicodeString := U'abcd\353';
        // becomes 'abcdë' with a German locale


Naming a field UTF8_anything produces a similar syntax error.

For now, I suggest either removing the underscore or adding something before it like MyUNICODE_

I am looking into this further and have opened this Jira issue to discuss either changing the behavior or documenting it. https://track.hpccsystems.com/browse/HPCC-18071 I suspect documenting it will be the choice.

HTH,
Jim
JimD
 
Posts: 136
Joined: Wed May 18, 2011 1:35 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron