![]() |
Telelogic Rhapsody (steve huntington) | ![]() |
Topic Title: Init variable with different values (Rhapsody 6.1 C) Topic Summary: Created On: 20-Apr-2007 09:39 Status: Read Only |
Linear : Threading : Single : Branch |
![]() |
![]()
|
![]() |
|
Hello,
I like to init a variable with different values depending on a #ifdef statement. E.g. #ifdef TEST static const a = 0; #else static const a = 1; #endif Do anybody have an idea on how to model this in Rhapsody. Thank you and best regards Jens |
|
![]() |
|
![]() |
|
Hi Jens,
try the following: Define a type called CONST_VALUE of type language: #ifdef TEST #define %s 0 #else #define %s 1 #endif Define a variable called "a" with an initial value of CONST_VALUE and make it constant. regards, Ian |
|
![]() |
FuseTalk Standard Edition v3.2 - © 1999-2009 FuseTalk Inc. All rights reserved.