4.8.3.95. PRINTMSGWC
The PRINTMSGWC function prints some messages during analysis to the Output Window and MSG file. This function is for only C/C++.
Language type |
Subroutine |
C/C++ |
printmsgwc(wcName) |
Variable Name |
type |
Description |
wcName |
wchar_t* |
The input variable, this wide character string value is printed in output window. |
#include "stdafx.h"
#include "DllFunc.h"
#include <stdio.h>
Test_USUB_axial_API void __cdecl axial_force
(double time, double upar[], int npar, int jflag, int iflag, double* result)
{
using namespace rd_syscall;
// Parameter Information
// time: Simulation time of RD/Solver
// upar: Parameters defined by user
// npar: Number of user parameters
// jflag: When RD/Solver evaluates a Jacobian, the flag is true.
// iflag: When RD/Solver initializes arrays, the flag is true.
// result: Returned value
// User statement
// Local Variable Definition
int mkid[3], errflg, akispl_id;
double disp, value[3];
whar_t* messageWC;
// Assign Impact Parameters
mkid[0] = (int) upar[0];
mkid[1] = (int) upar[1];
mkid[2] = (int) upar[2];
akispl_id = (int) upar[3];
// Call the Auxiliary subroutines for Calculation
sysfnc("DX", mkid, 3, &disp, &errflg);
rd_akispl(disp, 0, akispl_id, 0, value, &errflg);
// Assign the Returned Value
*result = value[0];
// Write results in the Output window
swprintf(messageWC, L"Result = %f", *result);
printmsgwc(messageWC);
}