Opened 9 years ago
Closed 9 years ago
#645 closed proposed feature (not a bug)
newstruct: names for the compontents only allow characters (typos)
Reported by: | gorzel | Owned by: | somebody |
---|---|---|---|
Priority: | minor | Milestone: | 4-1-0 and higher |
Component: | doc | Version: | 4-0-0 |
Keywords: | newstruct | Cc: |
Description
For the names of variables are allowed the characters a..z, A..Z, followed by 0,1,...,9 as well as ' and _
intvec w1,w2; int C_1; string S';
For newstructs, the choice of names is more (too) restrictive:
> newstruct("nt","intvec w1, intvec w2"); ? unknown character in newstruct:>>1, intvec w2<< ? error occurred in or before STDIN line 7: `newstruct("nt","intvec w1, intvec w2");` ? wrong type declaration. type 'help intvec;'
Change History (4)
comment:1 Changed 9 years ago by
Summary: | newstruct: no names for the compontents only allow characters (n → newstruct: names for the compontents only allow characters |
---|
comment:2 follow-up: 3 Changed 9 years ago by
Resolution: | → not a bug |
---|---|
Status: | new → closed |
comment:3 Changed 9 years ago by
Component: | singular-kernel → doc |
---|---|
Resolution: | not a bug |
Status: | closed → reopened |
Summary: | newstruct: names for the compontents only allow characters → newstruct: names for the compontents only allow characters (typos) |
Type: | bug → proposed feature |
Replying to hannes:
Member names are not variable names. Member names are restricted to alphanumeric characters, starting with a letter.
I don't understand. Are the names of newstructs now "member names"? Then w1 and w2 will fit.
If this should not be allowed, then state it in the manual.
4.22.1 Definition of a user defined type defines a new type with elemnts given by the last argmuent (string_expression).
At least two typos may be corrected here: elements, arguments
comment:4 Changed 9 years ago by
Resolution: | → not a bug |
---|---|
Status: | reopened → closed |
typo fixed. And the example works (with w1, w2) -> not a bug. With w@ it would not work, but this is also documented.
Member names are not variable names. Member names are restricted to alphanumeric characters, starting with a letter.