Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic TAU (steve huntington)
Decrease font size
Increase font size
Topic Title: How to use cast function?
Topic Summary: TAU, G2, cast, pointer
Created On: 31-May-2005 01:13
Status: Read Only
Linear : Threading : Single : Branch
Search Topic Search Topic
Topic Tools Topic Tools
Subscribe to this topic Subscribe to this topic
E-mail this topic to someone. E-mail this topic
Bookmark this topic Bookmark this topic
View similar topics View similar topics
View topic in raw text format. Print this topic.
 31-May-2005 01:13
User is offline View Users Profile Print this message


younghae jung

Posts: 5
Joined: 6-Oct-2003

Dear members.

I want to use casting function as like c lang.
so I find it in the Predefined->cast(ARG):T.

I'm very happy to support this function in TAU.
But TAU is disappointed to me. because TAU is crashed during the execution to verify the model.

Syntax is very clear. but during execution TAU is crashed.
Please support the this function.

sample code is as the follows.
Character a;
cast(a);

Thanks in advance.
Report this to a Moderator Report this to a Moderator
 3-Jun-2005 19:56
User is offline View Users Profile Print this message


Madan Mohan Tito A

Posts: 3
Joined: 16-Mar-2005

Hi Younghae Jung,

I have observed that the syntax you have provided is not correct. Please go through the below example on conversions.

//Declarations
Integer i;
double d;
Real R;
char ch;
CPtr cc;
'char*' cs;

//Assignments

i = 10;
d= 2.4;
R = 10;
ch = 'A';
cc = GetAddress(ch);
// Casting

cs = cast<'char*'> (cc);

i = cast (d);
d= 3.5;

R = cast (d);

Hope this helps.

With Best Regards
Madan




Edited: 3-Jun-2005 at 22:27 by Madan Mohan Tito A
Report this to a Moderator Report this to a Moderator
 10-Jun-2005 09:28
User is offline View Users Profile Print this message


Jongil Park

Posts: 4
Joined: 10-Jun-2005

Thank you for your advice.

I solved the cast operation.
so I verified the cast operation code through lauch on Model Verifier.
I'm very happy.

I'm falling into software modeling using TAU developer.
but I confront the barrier as like UML syntax, TAU usage.
TAU help manual is very lack of solving my problem.
So, I hope your advice next time.

Thank you for your advice again.

My test code is as the following:
//Declarations
Integer i;
double d;
Real R;
char ch;
CPtr<char> cc;
'char*' cs;
CPtr<CContext> pstContext;

//Assignments
i = 10;
d= 2.4;
R = 10;
ch = 'A';
cc = GetAddress(ch);
pstContext = GetAddress(Context[1]);

// Casting
cs = cast<'char*'> (cc);
i = cast<Integer> (d);
d= 3.5;
R = cast<Real> (d);
cs = cast<'char*'> (pstContext);
return;



Edited: 10-Jun-2005 at 12:19 by Jongil Park
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic TAU forum.
There are currently 1 users logged in.
The most users ever online was 15 on 31-Mar-2008 at 16:22.
There are currently 0 guests browsing this forum, which makes a total of 1 users using this forum.
You have posted 0 messages to this forum. 0 overall.

FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.