Skip to main content
Open topic with navigation CAPL Functions » System Variables » sysDefineVariableString

sysDefineVariableString

Valid for: CANoe DE • CANoe:lite DE • CANoe4SW DE • CANoe4SW:lite DE Note Variables defined with this function can only be accessed using the sysGetVariable.../sysSetVariable... functions where namespace and variable name are given as string parameters. The variable can only be created with an available namespace. The namespace can be created with sysDefineNamespace.

Function Syntax

long sysDefineVariableString(char namespace[], char variable[], char initialValue[]);

Description

Defines a variable of the String (char[]) type.

Parameters

  • namespace: Name of the namespace.
  • variable: Name of the variable.
  • initialValue: Initial value of the variable.

Return Values

  • 0: no error, function successful
  • 1: namespace was not found or second try to define the same namespace
  • 2: variable was not found or second try to define the same variable
  • 3: no writing right for the namespace available
  • 4: the variable has no suitable type for the function

Example