[BACK]Return to callsm1.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Annotation of OpenXM/src/kan96xx/Doc/callsm1.sm1, Revision 1.3

1.3     ! takayama    1: %% $OpenXM: OpenXM/src/kan96xx/Doc/callsm1.sm1,v 1.2 1999/11/09 11:43:34 takayama Exp $
1.1       maekawa     2: %% Library for ox_sm1 to be called from asir cf. xm (callsm1.asir)
                      3: %% This file is automatically loaded when ox_sm1 is called
                      4: %% with the name ox_sm1_forAsir.  See kxx/oxserver00.c.
1.2       takayama    5: /whoami {  ( SSkan/lib/callsm1.sm1, 1999/11/9.  ) message  } def
1.1       maekawa     6:
                      7: /@@@.Dsymbol (d) def
                      8: /@@@.esymbol (e0) def
1.3     ! takayama    9: /@@@.Esymbol (ee0) def
        !            10: /@@@.Hsymbol (hh) def
1.1       maekawa    11:
                     12: /toAsirVar {
                     13:   /arg1 set
                     14:   [/in-toAsirVar /s /i /ans] pushVariables
                     15:   [
                     16:     /s arg1 def
                     17:     s isArray { s {toAsirVar} map /ans set}
                     18:     {
                     19:        s (array) dc /s set
                     20:        s { /i set
                     21:           i 64 gt  i 91 lt and   %% 64 = @, 90 = Z, 96=`,
                     22:           {
                     23:              i 68 eq {           %% 68 = D, 32 = space.
                     24:                i 32 add
                     25:              }
                     26:              { i 32 add i  } ifelse
                     27:           }
                     28:           { i  } ifelse
                     29:        } map {(string) dc} map cat /ans set
                     30:     } ifelse
                     31:     /arg1 ans def
                     32:   ] pop
                     33:   popVariables
                     34:   arg1
                     35: } def
                     36:
                     37: %%[[(x) (Dx) (E) (T) (Dx0)] toAsirVar    ] ::
                     38: %%(_xy) toAsirVar ::
                     39:
                     40: /toAsirForm {
                     41:   /arg1 set
                     42:   [/in-toAsirForm /aa /ans] pushVariables
                     43:   [
                     44:     /aa arg1 def
                     45: %%    (toAsirForm : ) messagen aa message
                     46:     aa isArray {
                     47:        aa {toAsirForm} map /ans set
                     48:        /toAsirForm.LLL goto
                     49:     } {  } ifelse
                     50:     aa isPolynomial {
                     51:        aa (0). eq {
                     52:          /ans (0). def
                     53:        } {
                     54:          /ans [(sm1_dp) aa getvNamesCR toAsirVar  aa] def
                     55:        } ifelse
                     56:        /toAsirForm.LLL goto
                     57:     } { } ifelse
                     58:     aa isInteger {
                     59:        aa 0 eq {
                     60:           /ans null def  %% You cannot send universalNumber 0 to the current
                     61:                          %% asir  1999, 6/10. Try sm1(" 0 "); sm1_pop();
                     62:        } {
                     63:          /ans aa (universalNumber) dc def
                     64:        } ifelse
                     65:        /toAsirForm.LLL goto
                     66:     } { } ifelse
                     67:     aa isUniversalNumber {
                     68:        aa (0).. eq {
                     69:           /ans null def  %% You cannot send universalNumber 0 to the current
                     70:                          %% asir
                     71:        } {
                     72:          /ans aa def
                     73:        } ifelse
                     74:        /toAsirForm.LLL goto
                     75:     } { } ifelse
                     76:
                     77:
                     78:     /ans aa def
                     79:
                     80:     /toAsirForm.LLL
                     81:     /arg1 ans def
                     82:   ] pop
                     83:   popVariables
                     84:   arg1
                     85: } def
                     86:
                     87: /foo {[(x) ring_of_polynomials 0] define_ring
                     88: (x^2-1). /ff set
                     89: [(x) ring_of_differential_operators 0] define_ring
                     90: (x^2-1). /gg set
                     91: [ff gg 0 1 (123).. [(Hello)]] toAsirForm ::
                     92: } def
                     93:

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