[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.1

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

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