Closed zongz1024 closed 5 years ago
What do you mean exactly by "all the char"?
Perhaps you mean the characters from international alphabet 5 - see the complete set of characters here: https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/nls/rbagscharset01169.htm
In that case I suggest you use the IA5String
built-in ASN.1 type, instead of PrintableString
(which is not supported in Opengeode
)
Perhaps you mean the characters from international alphabet 5 - see the complete set of characters here: https://www.ibm.com/support/knowledgecenter/en/ssw_ibm_i_73/nls/rbagscharset01169.htm
In that case I suggest you use the
IA5String
built-in ASN.1 type, instead ofPrintableString
(which is not supported inOpengeode
)
If I want to represent the complete set of characters,do I need to list all character ranges? like this:
char ::= PrintableString (FROM ("a".."z")|FROM ("A".."Z")|FROM("0".."9")|FROM("+".."?"))
to represent them
As I said, you just need to use the IA5String
type instead of PrintableString
. It contains this character set already.
As I said, you just need to use the
IA5String
type instead ofPrintableString
. It contains this character set already.
like this???
char ::=IA5String;
a char::="a";
No, like this:
MyString ::= IA5String (SIZE (0..100))
Then if needed you can define constants of this type:
a MyString ::= "Hello, world"
If you want to use it in the SDL model:
dcl a MyString := 'Hello, world';
No, like this:
- First you subtype IA5String to give it size limits:
MyString ::= IA5String (SIZE (0..100))
- Then if needed you can define constants of this type:
a MyString ::= "Hello, world"
- If you want to use it in the SDL model:
dcl a MyString := "Hello, world";
I do not want to represent a String.I just want to represent character type. Like this. Is it right?
Char ::= IA5String (SIZE (0..1))
dcl a MyChar := "H";
If it is one char you can use (SIZE (1))
And then dcl a MyChar := 'h';
(use single quotes for strings in SDL, not double quote - sorry I made the mistake in my previous answer)
If it is one char you can use
(SIZE (1))
And thendcl a MyChar := 'h';
(use single quotes for strings in SDL, not double quote - sorry I made the mistake in my previous answer)
OK,Thanks for your help again.
You're welcome.
Sorry to bother you again ! I want to use asn.1 syntax to represent character types. but it is not given directly on the website which you gave to me. So I get this way by myself after reading something from the web which you gave to me.But I do not know whether it is right.
But this way only can represent the char of letter , How can I represent all the char??? Thank you for your lots of help.