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: Predefined Type usage
Topic Summary: Using Predefined Datatype In Tau G2
Created On: 3-Mar-2006 02:46
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.
 3-Mar-2006 02:46
User is offline View Users Profile Print this message


Hye-Jung Hwang

Posts: 3
Joined: 14-Jul-2005

Hi.

I defined some syntype using Predefined Datatypes like below.
Tau doesn't recognize only Array Datatype 
But~ it recognize Integer type  --;

I have no idea why Tau doesn't .
Do I miss somthing to do before I use predefined Datatype?
 

=================================================

syntype i_sector = Integer constants (0 .. SECTOR_SIZE - 1);



syntype ta_sector_data = Array<i_sector, UINT8>;



Edited: 3-Mar-2006 at 02:48 by Hye-Jung Hwang
Report this to a Moderator Report this to a Moderator
 24-Mar-2006 15:17
User is offline View Users Profile Print this message


Ian Barnard

Posts: 91
Joined: 4-Jul-2002

A syntype is a restricted copy of the original type; your i_sector is a good example of this. Hence you can't use it to define a brand new type based on Array.

To create an attribute which is an array indexed by index type i_sector, do this:

syntype i_sector = Integer constants (0..5) ;
Array< i_sector,Integer > i_sector_array;

If you are using the C++ code generator you could also use the STL containers in cppstdlibrary:

HTH
Ian

===============
Ian Barnard
Principal Consultant
Telelogic UK

-------------------------
=============
Ian Barnard
Principal Consultant
Telelogic UK, an IBM company


Edited: 24-Mar-2006 at 15:19 by Ian Barnard
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.