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

TOPIC: (Kein Thema)

(Kein Thema) 20 Jan 2003 10:08 #6377

In einer eMail vom 1/18/03 2:49:04 AM W. Europe Standard Time schreibt
This email address is being protected from spambots. You need JavaScript enabled to view it.:

Hi Mariusz,

The formal parameter identifiers value and length are ILLEGAL.
These are TTCN-3 reserved words. These need to be changed.
I suspect that this goes for all other predefined operations.

See table A.3 of ES201 873-1.




> Hi,
>
> Clause C.11 Integer to octetstring
> int2oct(in integer value, in integer length) return octetstring
>
> "The number of hexadecimal digits provided shall be multiples of 2 since
> one octet is composed of two hexadecimal digits."


> Does it mean that octetstring length is measured in hexadecimal digits, not
> in octets?
> I have expected that length is measured in octets according Clause C.13 and
> that following description should be changed from:
>
I can see where the confusion might arise. The first sentence you highlight
above is
to emphasize the fact that an octet = 2 hex digits and thus an even number of
hex
digits should be returned.

I assume that length is given in octets and not in hex digits.

>
> "If the conversion yields a value with fewer hexadecimal digits than
> specified in the length parameter, then the hexstring shall be padded on
> the left with zeros. A test case error shall occur if the value is negative
> or if the resulting hexstring contains more hexadecimal digits than
> specified in the length parameter."
>

I don't agree. The wording should avoid reference to the hextstring type,
since this is
an octetstring conversion. Further, the use of the word 'value' leads to
confusion, as
it is unclear whether it refers to the return value which is the octetstring,
or the in
parameter value.

As an aside, there are two glaring errors in the prototype for all the
predefined functions




As an aside, given your changed definition, what happens if I do the
following

int2octetstring( 15, 1) // 2nd par is given as # of octets

result = '0F'O //padding of 1 0 to the left of F occurs.

// this is needed as no assumption can
be made on the
// alignment of internal storage...

by your definition, for the correct result to occur, the 2nd parameter would
need to be
in hexdigits,

int2octetstring(15,2), I would then assume that 2 is the number of
octets and not the
number of hexdigits.
>
> to
>
> "If the conversion yields a value with fewer OCTETS than specified in the
> length parameter, then the OCTETstring shall be padded on the left with
> zeros. A test case error shall occur if the value is negative or if the
> resulting OCTETstring contains more OCTETS than specified in the length
> parameter."
>
> BR,
>

Better, however referene to value is unclear. Is it the return value, or the
input parameter.


Cheers,


Claude.



Claude Desroches e-mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
Technical Architect This email address is being protected from spambots. You need JavaScript enabled to view it.
Strategic Test Solutions Ltd.
City Gate East.
Toll House Hill,
Nottingham.
NG1 5FS.

Tel: +44 115 958 6600
Fax: +44 115 958 6633
Mob: +44 796 648 2165
The administrator has disabled public write access.
  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin