Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: about ArrayDef in TTCN3

about ArrayDef in TTCN3 24 Jun 2003 04:10 #6499

  • Jacon_wang
  • Jacon_wang's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 7
  • Karma: 0
hello, all
In the standard es-201 873 01v 020201(2003-02) clause 6.5 says:
" In common with many programming languages,arrays are not considered to be types in
TTCN-3.Instead,they may be specified at the point of a variable declaration."
However ,according to the following production
42. SubTypeDef ::= Type (SubTypeIdentifier | AddressKeyword) [ArrayDef] [SubTypeSpec]
the defintion "type integer MyInt[10] (1..10);" is valid.
I am confused about this.
please give me the semantic the above defintion.
Thanks in advance.

             =A
1   ?003-06-24
--
Engineering is the art of making what you want from
things you can get.
Department of Automation
The University of Science and Technology of China
RoomX11-215,Jinzai Road,Hefei,Anhui,P.R.China
Tel: +86-551-3624003(H),+86-551-3606534-3016(O)
Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
The administrator has disabled public write access.

about ArrayDef in TTCN3 24 Jun 2003 06:18 #6500

Hello,

I understand your example as an array of 10 integers, where the integers are restricted to the values 1 to 10.

Best regards

Thomas

| Thomas Dei? Nokia Research Center Street address: |
| P.O. Box 101823 Meesmannstrasse 103 |
| D-44718 Bochum, GERMANY D-44807 Bochum, GERMANY |
| Phone: +49 234 984 2217 (int. 8272217) |
| Fax: +49 234 984 3491 (int. 8273491) |
| E-mail: This email address is being protected from spambots. You need JavaScript enabled to view it. |


>
Original Message
> From: ext jacon wang [This email address is being protected from spambots. You need JavaScript enabled to view it.]
> Sent: Tuesday, June 24, 2003 6:11 AM
> To: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Subject: about ArrayDef in TTCN3
>
>
> hello, all
> In the standard es-201 873 01v 020201(2003-02) clause 6.5 says:
> " In common with many programming languages,arrays are not
> considered to be types in
> TTCN-3.Instead,they may be specified at the point of a
> variable declaration."
> However ,according to the following production
> 42. SubTypeDef ::= Type (SubTypeIdentifier | AddressKeyword)
> [ArrayDef] [SubTypeSpec]
> the defintion "type integer MyInt[10] (1..10);" is valid.
> I am confused about this.
> please give me the semantic the above defintion.
> Thanks in advance.
>
>                  2003-06-24
> --
> Engineering is the art of making what you want from
> things you can get.
>
> Department of Automation
> The University of Science and Technology of China
> RoomX11-215,Jinzai Road,Hefei,Anhui,P.R.China
> Tel: +86-551-3624003(H),+86-551-3606534-3016(O)
> Email: This email address is being protected from spambots. You need JavaScript enabled to view it.
>
The administrator has disabled public write access.

about ArrayDef in TTCN3 24 Jun 2003 06:52 #6501

Hi Jacon,

the TTCN-3 standard is not entirely clear on this. Looking at the BNF, your
type definition is perfectly legal.

On the other hand, clause 6.5 states that arrays are _not_ types in TTCN-3 and
are only defined with variable definitions.

So, I guess this bit does indeed need clarification in the standard, and I am
not entirely sure what was intended. Personally, I would think that there is
no problem in treating arrays as normal aggregated types like record of, for
example.

Also, as far as I know, using explicit array types is the only way to pass
arrays as parameters - it is impossible to specify a array parameter inline
in the formal parameter list. This would make arrays hardly usable. Of
course, with explicit arrays, this is no longer a problem because the
explicit array type can be used for the parameter.

Best regards

Stephan

> hello, all
> In the standard es-201 873 01v 020201(2003-02) clause 6.5 says:
> " In common with many programming languages,arrays are not considered to be
> types in TTCN-3.Instead,they may be specified at the point of a variable
> declaration." However ,according to the following production
> 42. SubTypeDef ::= Type (SubTypeIdentifier | AddressKeyword) [ArrayDef]
> [SubTypeSpec] the defintion "type integer MyInt[10] (1..10);" is valid.
> I am confused about this.
> please give me the semantic the above defintion.
> Thanks in advance.
>
>                  2003-06-24
The administrator has disabled public write access.

about ArrayDef in TTCN3 24 Jun 2003 07:10 #6502

Hi Sephan, Jacon, and all,


Stephan Tobies wrote:

> So, I guess this bit does indeed need clarification in the standard, and I am
> not entirely sure what was intended. Personally, I would think that there is
> no problem in treating arrays as normal aggregated types like record of, for
> example.

An array could be defined as a shorthand in-line definition of
"record of" type when a variable is declared.

This would allow processing the arrays as currently, but would not
add another (similar to record of) type to the TTCN-3 standard if
parameter passing of arrays etc is needed.

This would limit the need to define new but similar "Values" in TCI
and adding new complexity to the standard.


Best regards,
Vesa-Matti

--

Vesa-Matti Puro
OpenTTCN Oy
www.openttcn.com
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin