Page 1 of 1
How to return UNDEFINED
Posted:
25 May 2023, 15:48
by jrdp
Re: How to return UNDEFINED
Posted:
26 May 2023, 13:10
by jasper
The definition you see is for passing as input argument. As output argument - I suppose the easiest it so call .clear() on the passed output argument itself - UNDEFINED for a string value equals an empty string.
Re: How to return UNDEFINED
Posted:
26 May 2023, 13:11
by jasper
What is the context in which you are returning UNDEFINED? Which function is it?
Re: How to return UNDEFINED
Posted:
30 May 2023, 13:41
by jrdp
This question arose whilst working on implementing the GetPresentPhases function of the ICapeThermoMaterial interface. The overall context is implementing a Modelica-CAPE-OPEN interface for Dymola.
Re: How to return UNDEFINED
Posted:
30 May 2023, 16:15
by jrdp
Regarding this particular function, GetPresentPhases, its parameters are CapeArrayString and CapeArrayEnumeration<CAPEOPEN_1_2::CapePhaseStatus>, so there is no clear()-function available. Would a resize(0) on the output parameters comply with the specification of the function?
Re: How to return UNDEFINED
Posted:
05 June 2023, 06:02
by jasper
Yes - UNDEFINED for arrays is an empty array. Indeed resize(0) will do the trick.