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

TOPIC: Question about ReferencedType

Question about ReferencedType 21 Mar 2003 08:58 #6441

  • Xdji
  • Xdji's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Karma: 0
Hi all,
I have a question about the ExtendedFieldReference and ReferencedType:

Gyorgy Rethy and Carl Cerecke once said, only in the case of import can
fields of the structured type be seen as type definitions, like this (copy from
Carl's letter):

//////////////////////////////////////////
module A {

type record T1 {
T2 f1;
}
}

module B {

import from module A {
type T1;
}

function F1() {
var T1.f1 foo := bar;
}
}
////////////////////////////////////////////////
The T1.f1 is used as a type definition,if the T1 is not a type imported from
moduleA,is the definition of foo still valid? For example:

type record Rec1
{
integer field1;
}

const Rec1.field1 cons1 := 2; //a valid defition???


By the way,This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it. are same ttcn-3 maillist
addresses??

Thanks.





Ji XiangDong
Univ. of Science & Technology of China
86-551-3606124
This email address is being protected from spambots. You need JavaScript enabled to view it.
2003-03-21 16:13:50
The administrator has disabled public write access.

Question about ReferencedType 21 Mar 2003 09:34 #6442

> By the way,This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it. are same ttcn-3 maillist addresses??

Recently ETSI changed from .fr to .org

.fr will maintained for sometime and therefore both This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it. will work (i.e., it is the same list). However, This email address is being protected from spambots. You need JavaScript enabled to view it. is the preferred address.

Regards,
Anthony Wiles

>
Original Message
> From: xdji [This email address is being protected from spambots. You need JavaScript enabled to view it.]
> Sent: 21 March 2003 09:58
> To: This email address is being protected from spambots. You need JavaScript enabled to view it.
> Subject: Question about ReferencedType
>
>
> Hi all,
> I have a question about the ExtendedFieldReference
> and ReferencedType:
>
> Gyorgy Rethy and Carl Cerecke once said, only in the
> case of import can fields of the structured type be seen as
> type definitions, like this (copy from Carl's letter):
>
> //////////////////////////////////////////
> module A {
>
> type record T1 {
> T2 f1;
> }
> }
>
> module B {
>
> import from module A {
> type T1;
> }
>
> function F1() {
> var T1.f1 foo := bar;
> }
> }
> ////////////////////////////////////////////////
> The T1.f1 is used as a type definition,if the T1 is not a
> type imported from moduleA,is the definition of foo still
> valid? For example:
>
> type record Rec1
> {
> integer field1;
> }
>
> const Rec1.field1 cons1 := 2; //a valid defition???
>
>
> By the way,This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it. are
> same ttcn-3 maillist addresses??
>
> Thanks.
>
>
>
>
>
> Ji XiangDong
> Univ. of Science & Technology of China
> 86-551-3606124
> This email address is being protected from spambots. You need JavaScript enabled to view it.
> 2003-03-21 16:13:50
>
The administrator has disabled public write access.

Question about ReferencedType 21 Mar 2003 09:43 #6443

Hello!

I would say that your type definition is correct except for the semicolon
after field1 identifier (which is not according to T3 CN syntax), i.e.
definitions are valid.

BR

/Stefan

Original Message
From: xdji [This email address is being protected from spambots. You need JavaScript enabled to view it.]
Sent: Friday, March 21, 2003 9:58 AM
To: This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Question about ReferencedType


Hi all,
I have a question about the ExtendedFieldReference and
ReferencedType:

Gyorgy Rethy and Carl Cerecke once said, only in the case of import
can fields of the structured type be seen as type definitions, like this
(copy from Carl's letter):

//////////////////////////////////////////
module A {

type record T1 {
T2 f1;
}
}

module B {

import from module A {
type T1;
}

function F1() {
var T1.f1 foo := bar;
}
}
////////////////////////////////////////////////
The T1.f1 is used as a type definition,if the T1 is not a type imported from
moduleA,is the definition of foo still valid? For example:

type record Rec1
{
integer field1;
}

const Rec1.field1 cons1 := 2; //a valid defition???


By the way,This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it. are same ttcn-3
maillist addresses??

Thanks.





Ji XiangDong
Univ. of Science & Technology of China
86-551-3606124
This email address is being protected from spambots. You need JavaScript enabled to view it.
2003-03-21 16:13:50
The administrator has disabled public write access.

Question about ReferencedType 21 Mar 2003 16:24 #6445

Hi,

Regarding the question itself, I doubt that I told that. You will not find any such restriction in subclauses 6.3.1.1, 6.3.2.1 & 6.3.5.1.

What could cause the mismatch is the visibility of NAMES when you are importing a structured type definition. As in your example, when definining a structured type you can use a built-in or referenced type name only (T2 in your example).
If for example

type set T2
{
integer t2f1,
octetstring t2f2
}


and you are importing T1 into module B by the default (non-recursive) mechanism, it will be seen in module B as it was something like

" type record T1 {
set //Note that this is not a correct TTCN-3 syntax!
{
integer t2f1,
octetstring t2f2
} f1
}
"

and you could not use it as a definition, but you can write:
template T1 t1temp := { f1 := { t2f1 := 2, t2f2 := 'AA'O } }

BUT, if you are importing T1 alone and not T2, you can not use the NAME T2 in module B. But its type information is still available as T1.f1

Best Regards, Gy?gy


> dr Gy?gy R?HY, MScEE, PhD
> Manager
> Test Services, Test House, Ericsson Hungary
> Address: H-1037 Budapest, Laborc street 1.
> Phone: + 36 (1) 437-7006
> Mobile: + 36 (30) 297-7862
> Fax: + 36 (1) 437-7767
> Mail-to: This email address is being protected from spambots. You need JavaScript enabled to view it.


>
Original Message
>From: xdji [This email address is being protected from spambots. You need JavaScript enabled to view it.]
>Sent: Friday, March 21, 2003 9:58 AM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: Question about ReferencedType
>
>
>Hi all,
> I have a question about the ExtendedFieldReference and
>ReferencedType:
>
> Gyorgy Rethy and Carl Cerecke once said, only in the
>case of import can fields of the structured type be seen as
>type definitions, like this (copy from Carl's letter):
>
>//////////////////////////////////////////
>module A {
>
> type record T1 {
> T2 f1;
> }
>}
>
>module B {
>
> import from module A {
> type T1;
> }
>
> function F1() {
> var T1.f1 foo := bar;
> }
>}
>////////////////////////////////////////////////
>The T1.f1 is used as a type definition,if the T1 is not a type
>imported from moduleA,is the definition of foo still valid?
>For example:
>
>type record Rec1
>{
> integer field1;
>}
>
>const Rec1.field1 cons1 := 2; //a valid defition???
>
>
>By the way,This email address is being protected from spambots. You need JavaScript enabled to view it. and This email address is being protected from spambots. You need JavaScript enabled to view it. are same
>ttcn-3 maillist addresses??
>
>Thanks.
>
>
>
>
>
>Ji XiangDong
>Univ. of Science & Technology of China
>86-551-3606124
>This email address is being protected from spambots. You need JavaScript enabled to view it.
>2003-03-21 16:13:50
>
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin