Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#3647 closed defect (fixed)

boolString doesn't work as function argument

Reported by: Willi Braun Owned by: Martin Sjölund
Priority: normal Milestone: 1.9.4
Component: MetaModelica Version:
Keywords: Cc:

Description

For example:

stringlst = List.map(blst, boolString);

produces an error like that:

error: use of undeclared identifier 'boxvar_boolString'; did you mean 'boxptr_realString'?

Change History (8)

comment:1 by Martin Sjölund, 9 years ago

Needs to be added to SimulationRuntime, then... But you don't need it for now:

list(String(b) for b in blst);

comment:2 by Willi Braun, 9 years ago

hm, what's a about something like that:

print(stringDelimitList(list(String(b) for b in blst), "  "));

result:

warning: implicit declaration of function 'modelica_metatype_to_modelica_string'
      is invalid in C99 [-Wimplicit-function-declaration
warning: incompatible integer to pointer conversion assigning to
      'modelica_string' (aka 'void *') from 'int' [-Wint-conversion]

comment:3 by Martin Sjölund, 9 years ago

The problem is the built-in String() in Static.mo won't call the correct type-conversion functions. I guess boolString does... It's an easy fix once I have time.

comment:4 by Willi Braun, 9 years ago

ah, okay. However, but that works :)

print(stringDelimitList(list(String(b) for b in blst), "  "));

comment:5 by Martin Sjölund, 9 years ago

Milestone: Future1.9.4
Status: newaccepted

comment:6 by Martin Sjölund, 9 years ago

Resolution: fixed
Status: acceptedclosed

comment:7 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.4-1.9.x

Milestone renamed

comment:8 by Martin Sjölund, 9 years ago

Milestone: 1.9.4-1.9.x1.9.4

Milestone renamed

Note: See TracTickets for help on using tickets.