Welcome to Telelogic Product Support
  Home Downloads Knowledgebase Case Tracking Licensing Help Telelogic Passport
Telelogic Rhapsody (steve huntington)
Decrease font size
Increase font size
Topic Title: Two dimentional array
Topic Summary:
Created On: 1-Jan-2008 04:26
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.
 1-Jan-2008 04:26
User is offline View Users Profile Print this message


Roei Goldblat

Posts: 2
Joined: 1-May-2007

I am using Rhapsody C v. 7.0 MR2.
How do I define a two dimentional array for C++ in Rhapsody?
Roei
Report this to a Moderator Report this to a Moderator
 7-Jan-2008 15:16
User is offline View Users Profile Print this message


Bernhard Gassner

Posts: 15
Joined: 27-Jun-2007

I found an solution for this problem, but I am not sure if there is a better one around.
Here is my solution, which I use at Rhapsody C v 7.1.*, and I am sure it works at 7.0.* too.

Create a new variable and open the feature-dialog for it.
Uncheck the 'Use existing type' setting to get the custom text field for the type.
In the 'C declaration' text field enter your array definition in the following form: <type> %s <dimensions>
E.g.: int %s [10][5]

In the source code the %s is replaced with the variable name, which you entered as usual in Rhapsody.

Greetings,
Bernhard

Edit:
Almost forgot something important.
When using custom types, check out the properties which define how this type is handled when it is used in a parameter list. Maybe the settings are correct for your case, but better check them before you get some strange behaviour later.
The properties should be self-explaining.
You can find them at: C_CG::Type::In / InOut / Out / ReturnType

Edited: 7-Jan-2008 at 15:28 by Bernhard Gassner
Report this to a Moderator Report this to a Moderator
Statistics
20925 users are registered to the Telelogic Rhapsody forum.
There are currently 0 users logged in.
You have posted 0 messages to this forum. 0 overall.

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