def func0():
print('func1')
def func1(arg1, arg2):
"Output: arg3, arg4"
func0()
arg3=arg1 + arg2
arg4 = arg3 + 1
return arg3, arg4
def func2(arg1, arg2):
"Output: arg3"
func0()
arg3=arg1 + arg2
return arg3
def calcATimesB(a, b):
"Output: "
print ("Function with no output variables.")
c = a * b
print ("Result is: ", c, ", but is not returned")
return None
|
SAS Micro Analytic Service
Type
|
SAS Micro Analytic Service
Functions
|
Python Type
|
Python Example
|
|---|---|---|---|
|
String
|
|
Unicode string
|
outStr = unicode('abcdef')
|
|
BigInt
|
|
Long
|
outLong = 10
|
|
Double
|
|
Float
|
outFloat = 10.10
|
|
Boolean
|
|
Boolean
|
outBool = True
|
|
Datetime
|
|
Datetime
|
outDatetime = datetime.datetime(2013,
12, 22, 11, 30, 59)
|
|
Date
|
|
Date
|
outDate = datetime.date(2013,
12, 22)
|
|
Time
|
|
Time
|
outTime = datetime.time(11,
30, 59)
|