624 views
in Embedded Wizard Studio by
Good Day to All.

is it possible to do a #define in coding inside slots and methods.

for example i want to define my array elements for later use with shorter names.

#define bit0 = Application::Storage.EW_CAN1_Digit_Array[0]

#define bit1 = Application::Storage.EW_CAN1_Digit_Array[1]

#define bit2 = Application::Storage.EW_CAN1_Digit_Array[2]

if(bit1 || bit2 || bit3 == 0)

//do someting

1 Answer

0 votes
by

Hello,

this is not possible in Chora. Maybe you can achieve the same with local variables? For example:

var bool bit0 = Application::Storage.EW_CAN1_Digit_Array[0]
var bool bit1 = Application::Storage.EW_CAN1_Digit_Array[1]
var bool bit2 = Application::Storage.EW_CAN1_Digit_Array[2]

if(bit1 || bit2 || bit3 == 0)
  ...

Best regards

Paul Banach

by
Thanks i will do it the long way for the time being. Will keep this in mind.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...