File: reference_cats.py

package info (click to toggle)
ats2-lang 0.4.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 40,064 kB
  • sloc: ansic: 389,637; makefile: 7,123; lisp: 812; sh: 657; php: 573; python: 387; perl: 365
file content (26 lines) | stat: -rw-r--r-- 550 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
######
#
# HX-2014-08:
# for Python code translated from ATS
#
######

######
# beg of [reference_cats.py]
######

############################################

def ats2pypre_ref(x): return [x]
def ats2pypre_ref_make_elt(x): return [x]

############################################
#
def ats2pypre_ref_get_elt(ref): return ref[0]
def ats2pypre_ref_set_elt(ref, x0): ref[0] = x0; return
#
def ats2pypre_ref_exch_elt(ref, x0): x1 = ref[0]; ref[0] = x0; return x1
#
############################################

###### end of [reference_cats.py] ######