[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TRNSYS-users] SETSTORAGESIZE, SETSTORAGEVARS and GETSTORAGEVARS in C++



Strangely, there seems to be a C access function to get the maximum number of storage spots, but none to actually push values to the S-array (let alone retrieve them).

 

You could of course add these functions to TRNSYS.h + the kernel, or threaten the TRNSYS developers until they do it, but most of the time you could just declare a static global variable or structure (or both) in your DLL and save the info you need there. (I guess that's why nobody ever missed that function - remember it was made for FORTRAN programmers who used horrors like COMMON blocks and such back in the last century...)

 

Werner

PS: The pacemaker type I sent recently uses this technique to remember the 'real world time' when it was started and the time it was last called in the line

CTime lastRealTime;

CTime startRealTime;

 

(To be really clean, it should actually read

static CTime lastRealTime;

)

 

-----Message d'origine-----
De : knut.erik.enerstvedt@niva.no [mailto:knut.erik.enerstvedt@niva.no]
Envoyé : vendredi 11 janvier 2008 15:57
À : trnsys-users@engr.wisc.edu
Objet : [TRNSYS-users] SETSTORAGESIZE,SETSTORAGEVARS and GETSTORAGEVARS in C++

 

Dear TRNSYS users,

 

Does anyone know how to declare SETSTORAGESIZE, SETSTORAGEVARS and

GETSTORAGEVARS correctly in the TRNSYS.h file, and then use these functions

in a C++ Type?

 

Kind regards,

Knut Erik

 

 

 

 

----------------------------------------------------------------------------------------------------------------------

NIVAs hovedkontor har flyttet til nye lokaler i CIENS - Forskningssenter

for miljø og samfunn; Gaustadalléen 21, 0349 Oslo. Meld deg på vårt

nyhetsbrev på www.niva.no

 

 

_______________________________________________

TRNSYS-users mailing list

TRNSYS-users@engr.wisc.edu

https://www.cae.wisc.edu/mailman/listinfo/trnsys-users

 

 

 

 

 

************************************************************************************

This footnote confirms that this email message has been scanned by

PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.

************************************************************************************

 

 

 





************************************************************************************
This footnote confirms that this email message has been scanned by
PineApp Mail-SeCure for the presence of malicious code, vandals & computer viruses.
************************************************************************************