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

TOPIC:

Strings with Control Characters in them 19 Sep 2002 09:41 #6217

Hi,

Is there an easier way to define strings with control characters in them,
than to write:

function GetCR() return charstring
{
var charstring cr := " ";
crlf[0] := int2char(13);
return crlf;
}

const charstring CR := GetCR();

template Modem_Signal Init_Val := {
data := "ATZ" & CR
}

I would say, either a conversion operation char2str, or some string value
notation as in C
would be necessary.

Regards,
Matthias

--
SAILING A NEW COURSE IN AUTOMATED SYSTEMS AND SOFTWARE DEVELOPMENT
09.+10. Oktober 2002, Telelogic User Conference, Munich, get more
information at:
www.telelogic.com/news/usergroup/de2002/index.cfm

Dr. Matthias Jung
Application Development
Telelogic Deutschland GmbH, Otto-Brenner-Str. 247 , 33604 Bielefeld, Germany
Phone: +49(521)14503-33
Fax: +49(521)14503-50
Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.


Telelogic - Putting you ahead in development!

Please Log in to join the conversation.

Strings with Control Characters in them 19 Sep 2002 10:54 #6218

Hi,

an easier way is:

template Modem_Signal Init_Val :=
{
data := "ATZ" & int2str(13)
}
OR
const charstring CR := int2str(13);

template Modem_Signal Init_Val := {
data := "ATZ" & CR
}


Best Regards, György

> dr György RÉTHY
> 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: Active_TTCN3 : MTS STF133 TTCN Version 3 - Active Members Only
>[This email address is being protected from spambots. You need JavaScript enabled to view it.]On Behalf Of Matthias Jung
>Sent: Thursday, September 19, 2002 11:41 AM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: Strings with Control Characters in them
>
>
>Hi,
>
>Is there an easier way to define strings with control
>characters in them,
>than to write:
>
> function GetCR() return charstring
> {
> var charstring cr := " ";
> crlf[0] := int2char(13);
> return crlf;
> }
>
> const charstring CR := GetCR();
>
> template Modem_Signal Init_Val := {
> data := "ATZ" & CR
> }
>
>I would say, either a conversion operation char2str, or some
>string value
>notation as in C
>would be necessary.
>
>Regards,
>Matthias
>
>--
>SAILING A NEW COURSE IN AUTOMATED SYSTEMS AND SOFTWARE DEVELOPMENT
>09.+10. Oktober 2002, Telelogic User Conference, Munich, get more
>information at:
>www.telelogic.com/news/usergroup/de2002/index.cfm
>
>Dr. Matthias Jung
>Application Development
>Telelogic Deutschland GmbH, Otto-Brenner-Str. 247 , 33604
>Bielefeld, Germany
>Phone: +49(521)14503-33
>Fax: +49(521)14503-50
>Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
>
>
>
>
>Telelogic - Putting you ahead in development!
>
>
>
>

Please Log in to join the conversation.

Strings with Control Characters in them 19 Sep 2002 14:47 #6219

Hi,

No, it isn't.

It sends:

ATZ13

What i need, is a carridge return after the Z.

Regards,
Matthias

--
SAILING A NEW COURSE IN AUTOMATED SYSTEMS AND SOFTWARE DEVELOPMENT
09.+10. Oktober 2002, Telelogic User Conference, Munich, get more
information at:
www.telelogic.com/news/usergroup/de2002/index.cfm

Dr. Matthias Jung
Application Development
Telelogic Deutschland GmbH, Otto-Brenner-Str. 247 , 33604 Bielefeld, Germany
Phone: +49(521)14503-33
Fax: +49(521)14503-50
Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.


Telelogic - Putting you ahead in development!



Ursprüngliche Nachricht
Von: Gyorgy Rethy (ETH) [This email address is being protected from spambots. You need JavaScript enabled to view it.]
Gesendet: Donnerstag, 19. September 2002 12:55
An: This email address is being protected from spambots. You need JavaScript enabled to view it.
Betreff: Re: Strings with Control Characters in them


Hi,

an easier way is:

template Modem_Signal Init_Val :=
{
data := "ATZ" & int2str(13)
}
OR
const charstring CR := int2str(13);

template Modem_Signal Init_Val := {
data := "ATZ" & CR
}


Best Regards, György

> dr György RÉTHY
> 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: Active_TTCN3 : MTS STF133 TTCN Version 3 - Active Members Only
>[This email address is being protected from spambots. You need JavaScript enabled to view it.]On Behalf Of Matthias Jung
>Sent: Thursday, September 19, 2002 11:41 AM
>To: This email address is being protected from spambots. You need JavaScript enabled to view it.
>Subject: Strings with Control Characters in them
>
>
>Hi,
>
>Is there an easier way to define strings with control
>characters in them,
>than to write:
>
> function GetCR() return charstring
> {
> var charstring cr := " ";
> crlf[0] := int2char(13);
> return crlf;
> }
>
> const charstring CR := GetCR();
>
> template Modem_Signal Init_Val := {
> data := "ATZ" & CR
> }
>
>I would say, either a conversion operation char2str, or some
>string value
>notation as in C
>would be necessary.
>
>Regards,
>Matthias
>
>--
>SAILING A NEW COURSE IN AUTOMATED SYSTEMS AND SOFTWARE DEVELOPMENT
>09.+10. Oktober 2002, Telelogic User Conference, Munich, get more
>information at:
>www.telelogic.com/news/usergroup/de2002/index.cfm
>
>Dr. Matthias Jung
>Application Development
>Telelogic Deutschland GmbH, Otto-Brenner-Str. 247 , 33604
>Bielefeld, Germany
>Phone: +49(521)14503-33
>Fax: +49(521)14503-50
>Mail: This email address is being protected from spambots. You need JavaScript enabled to view it.
>
>
>
>
>Telelogic - Putting you ahead in development!
>
>
>
>

Please Log in to join the conversation.

Strings with Control Characters in them 19 Sep 2002 18:15 #6221

In einer eMail vom 9/19/02 5:16:12 PM W. Europe Daylight Time schreibt
This email address is being protected from spambots. You need JavaScript enabled to view it.:

Hi Matthias,

It looks like the way you have implemented it is the only way. Surely \t or
\n
should also be permitted, put I have only found this in the regular
expressions
as part of pattern matching abilities.

Could control characters as defined in ISO646 be adopted as recognized
characters
into TTCN-3?

But...

you could define a universal string and define the \n as being the
appropriate quadruple.

var integer x,y,z, w;

const universal charstring CR := char (x,y,z, w)

I don't know values for the CR. Don't have access to ISO10646

Hope this helps.

Claude.


Claude Desroches
Technical Architect

Strategic Test Solutions Phone +44 (0) 1159 586 600
City Gate East Mobile +44 (0) 7966 482 165
Toll House Hill Fax +44 (0) 1159 586 633
Nottingham Email This email address is being protected from spambots. You need JavaScript enabled to view it.
NG1 5FS
This email address is being protected from spambots. You need JavaScript enabled to view it.
United Kingdom

Web www.strategictest.co.uk

TTCN - Imagination Technologies delivering tomorrow's test solutions today

This email and any files transmitted with it are confidential and are
intended solely for the use of the individual or entity to whom they are
addressed. This communication represents the originator's personal view and
opinions, which do not necessarily reflect those of the Concept Group. If
you are not the intended recipient or the person responsible for delivering
the email to the intended recipient, be advised that you have received this
email in error and that any use, dissemination, forwarding, printing,or
copying of this email is strictly prohibited. If you received this email in
error, please immediately notify This email address is being protected from spambots. You need JavaScript enabled to view it.

Please Log in to join the conversation.

  • Page:
  • 1

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin