Hi,
here is a short example code that copies the result of a calculation to a widget.
Perhaps, it helps.
----------------------
#include <stdio.h>
#include "dislin.h"
void mycalc (int id);
int id_text;
int main()
{ int ip, id_but;
ip = wgini ("vert");
id_but = wgpbut (ip, "Calculate");
swgcbk (id_but, mycalc);
id_text = wgtxt (ip, " ");
wgfin ();
return 0;
}
void mycalc (int id)
{ int i, n = 0;
for (i = 0; i < 100; i++)
n = n + i;
swgint (id_text, n);
}
----------------
For using Unicode characters you need a Unicode font such as Arial, convert some
Unicode numbers to a UTF8 string and set the character coding in chacod to 'UTF8'.
The following code plots some Turkish characters:
---------------
#include <stdio.h>
#include "dislin.h"
int main ()
{ int iray[4] = {286, 287, 350, 351};
int n;
char s[132];
metafl ("cons");
disini();
winfnt ("Arial");
n = intutf (iray, 4, s, 130);
chacod ("utf8");
height (50);
messag (s, 300, 300);
disfin ();
}
--------------
With best regards,
Helmut