Debian Codegraph @

ipl/packs/loadfuncpp/doc/divide.cpp

raw
1
2
3 /* Example of a C++ extension to icon via loadfunc,
4 * without garbage collection difficulties.
5 * Type 'make iexample' to build.
6 * Carl Sturtivant, 2008/3/16
7 */
8
9
10 #include "loadfuncpp.h"
11 using namespace Icon;
12
13 extern "C" int div(value argv[]) {
14 safe x(argv[1]), y(argv[2]), z;
15 z = ( x/y, x%y );
16 argv[0] = z;
17 return SUCCEEDED;
18 }
19
20