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 assign the value to the BYTE variable?
Topic Summary: BYTE, unsigned char, assignement
Created On: 31-May-2005 01:25
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:25
User is offline View Users Profile Print this message


younghae jung

Posts: 5
Joined: 6-Oct-2003

Dear members.

I made the BYTE type which is made from 'unsigned char'.
So I want to assign the value to variable of the this type.
But TAU don't allow to me while showing me "syntax error"?

What is incorrect?

Sample code is as the follows.

syntype BYTE = 'unsigned char';
BYTE byte;
'unsigned char' byte2;
byte = 'a'; --> syntax error
byte2 = 'a'; --> syntax error

How can I solve this problem?

Best regards.
Report this to a Moderator Report this to a Moderator
 3-Jun-2005 20:59
User is offline View Users Profile Print this message


Madan Mohan Tito A

Posts: 3
Joined: 16-Mar-2005

Hi Younghae Jung,

we can can not directly assign values to 'unsigned char'. We should go for inline assignment.

The syntax for assigning values to 'unsigned char' is

'unsigned char' uc;
Character s1='h';
uc = [[#(s1)]];

OR

syntype BYTE= 'unsigned char';
BYTE b;
Character s1='A';
b = [[#(s1)]];

Hope this Helps.

With Best Regards
Madan


Edited: 3-Jun-2005 at 22:29 by Madan Mohan Tito A
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.