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

File: [local] / OpenXM / src / kan96xx / Kan / plain.sm1 (download)

Revision 1.2, Sun Jan 16 07:55:40 2000 UTC (24 years, 4 months ago) by takayama
Branch: MAIN
CVS Tags: maekawa-ipv6, R_1_3_1-2, RELEASE_20000124, RELEASE_1_3_1_13b, RELEASE_1_2_3_12, RELEASE_1_2_3, RELEASE_1_2_2_KNOPPIX_b, RELEASE_1_2_2_KNOPPIX, RELEASE_1_2_2, RELEASE_1_2_1, RELEASE_1_1_3, RELEASE_1_1_2, KNOPPIX_2006, HEAD, DEB_REL_1_2_3-9
Changes since 1.1: +1 -0 lines

Congratulation of sm1 version 3.* !

%% $OpenXM: OpenXM/src/kan96xx/Kan/plain.sm1,v 1.2 2000/01/16 07:55:40 takayama Exp $ 
/= { set } def
/+ { add } def
/- { sub } def
/* { mul } def

/<< {  } def
/>> {  } def

/toArray { %% f1 ... fn n toArray [f1 ... fn]
  [ 2 1 roll %% f1 ... fn [ n
  1 add 1 roll %% [ f1 ... fn 
  ]
} def

/rotate_n {
  -1 roll
} def

/decompose {
  aload length
} def
/n 0 def /com 0 def /i 0 def /ar 0 def /res 0 def


/ring_of_difference_operator { %% ${x,y}$ ring_of_difference_operator
  /arg1 =
  /vars arg1 def
  ${}$  % first arg
  vars to_records /@e.n = $ee$
  @e.n 1 + toArray /vars = % vars = [$x$ $y$ $ee$]
  @e.n 1 + /@e.n =            % @e.n    =  3
  ${$ vars {$,$ 2 cat_n} map % [$x,$ $y,$ $ee,$]
  decompose pop  % $x,$ $y,$ $ee,$
  vars {$E$ 2 rotate_n $,$ 3 cat_n} map 
  decompose pop pop $eeE$ $}$ 
  @e.n 2 * 2 + cat_n  % the second arg
  ${}$ %% the third arg
  ${ee}$ $MED$ ${}$
} def