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

TOPIC: what does it imply by saying that optional fields shall be om ittedusing ...

what does it imply by saying that optional fields shall be om ittedusing ... 02 Jun 2003 08:27 #6490

Jacon, please read Stephan Tobies mail



BR



/Stefan



Original Message
From: jacon wang [This email address is being protected from spambots. You need JavaScript enabled to view it.]
Sent: den 2 juni 2003 10:18
To: This email address is being protected from spambots. You need JavaScript enabled to view it.
Subject: Re: what does it imply by saying that optional fields shall be
omittedusing ...



>
> var MyRecord r1;
> r1 := {10,true};

The above is a valid assignment. Each field in your record has a 'concrete'
value.

.. //after the assignment,is the value of r1.field1 equal to 10?
r1 := {omit,true};

The above is not legal TTCN-3. r1 would need to be declared as a template
for this
to be valid.
>>

The following is from clause 6.3.1.0

Or using an value list.
EXAMPLE 3:
MyRecordValue:= {MyIntegerValue, {'11001'B, true}, "A string"};
Optional fields shall be omitted using the omit symbol.
EXAMPLE 4:

Jacon's comment: Here , omit is assigned to a variable, not a template.

MyRecordValue:= {MyIntegerValue, omit , "A string"};
// Note that this is not the same as writing,
// MyRecordValue:= {MyIntegerValue, -, "A string"};
// which would mean the value of field2 is unchanged

>>
If one assumes that r1 is defined as a template, then the above is valid,
and r1.field will
now be absent if it is sent.


Comments anyone?

For some of us, the issue of assigning wildcards (matching mechanisms) to
variables, elements of a record, or set is somewhat unclear. :-).

Hope this helps.


Cheers,


Claude.

Claude Desroches email: This email address is being protected from spambots. You need JavaScript enabled to view it.



Conformance Technologies CDE email: This email address is being protected from spambots. You need JavaScript enabled to view it.
685 Cedar Point Road phone: +1 705 533 23 94

Penetanguishene, Ontario
Canada
L9M 1R3

Claude Desroches email: This email address is being protected from spambots. You need JavaScript enabled to view it. <This email address is being protected from spambots. You need JavaScript enabled to view it.>
Solonplatz 3 phone: +49 30 9606 7986
13088 Berlin fax: +49 30 9606 7987
Germany



_____
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin