[BACK]Return to simple2.ml CVS log [TXT][DIR] Up to [local] / OpenXM / src / ox_maple

Annotation of OpenXM/src/ox_maple/simple2.ml, Revision 1.1

1.1     ! takayama    1: # $OpenXM$
        !             2: ox_start_asir:=define_external(
        !             3:    'ml_start_asir',
        !             4:    'RETURN'::integer[4],
        !             5:    'LIB'="libsimple2.so");
        !             6:
        !             7: ox_push_int:=define_external(
        !             8:    'ml_push_int',
        !             9:    'num1'::integer[4],
        !            10:    'RETURN'::integer[4],
        !            11:    'LIB'="libsimple2.so");
        !            12:
        !            13: ox_execute_string:=define_external(
        !            14:    'ml_execute_string',
        !            15:    'num1'::string[],
        !            16:    'RETURN'::integer[4],
        !            17:    'LIB'="libsimple2.so");
        !            18:
        !            19: ox_pop_string0:=define_external(
        !            20:    'ml_pop_string0',
        !            21:    'RETURN'::integer[4],
        !            22:    'LIB'="libsimple2.so");
        !            23:
        !            24: ox_get_string:=define_external(
        !            25:    'ml_get_string',
        !            26:    'RETURN'::string[],
        !            27:    'LIB'="libsimple2.so");
        !            28:
        !            29: ox_select:=define_external(
        !            30:    'ml_select',
        !            31:    'RETURN'::integer[4],
        !            32:    'LIB'="libsimple2.so");
        !            33:
        !            34: ox_pop_string:=proc()
        !            35:   local c;
        !            36:   ox_pop_string0();
        !            37:   while true do
        !            38:     c := ox_select();
        !            39:     if (c = 1) then  RETURN( ox_get_string()); end if;
        !            40:     if (c = -1) then RETURN(-1); end if ;
        !            41:   end do;  # busy wait
        !            42: end:
        !            43:
        !            44: asir_gr:=proc(f,v,ord)
        !            45:    local sf,sv,sord;
        !            46:    sf := sprintf("%a",f);
        !            47:    sv := sprintf("%a",v);
        !            48:    sord := sprintf("%a",ord);
        !            49:    ox_execute_string(cat("gr(",sf,",",sv,",",sord,");"));
        !            50:    RETURN(parse(ox_pop_string()));
        !            51: end :
        !            52:
        !            53: # asir_gr([x^2+y^2-4,x*y-1],[x,y],2);
        !            54:

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>