-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2331 from anutosh491/Fixing_symbolic_parameters
Added support for functions to accept symbolic variables
- Loading branch information
Showing
3 changed files
with
165 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from sympy import Symbol, pi, S | ||
from lpython import S, i32 | ||
|
||
def addInteger(x: S, y: S, z: S, i: i32): | ||
_i: S = S(i) | ||
print(x + y + z + _i) | ||
|
||
def call_addInteger(): | ||
a: S = Symbol("x") | ||
b: S = Symbol("y") | ||
c: S = pi | ||
addInteger(a, b, c, 2) | ||
|
||
def main0(): | ||
call_addInteger() | ||
|
||
main0() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters