![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Two dimentional array Topic Summary: Created On: 1-Jan-2008 04:26 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
I am using Rhapsody C v. 7.0 MR2.
How do I define a two dimentional array for C++ in Rhapsody? Roei |
|
![]() |
|
![]() |
|
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 |
|
![]() |
Telelogic Rhapsody
» Rhapsody Category » Rhapsody
»
Two dimentional array
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.