This repository has been archived by the owner on Jul 27, 2019. It is now read-only.
Releases: JackCloudman/JackCC
Releases · JackCloudman/JackCC
Functions, procedures and input
Functions
Define function:
def myfunc(){
return $1+$2
}
Call function:
result = myfunc(5,4)
Procedures
Define procedures:
proc myproc(){
print "hello world!"
x = x+1
}
Call procedures:
myproc();
Input complex values
var = input("Message")
More functionality!
Strings
Show messages in your programs, now you can put strings as:
text = "My awesome text"
Some operations are:
text = "x :" + x # Convert complexnum to text
message = "hello "+ "world" # concatenate strings
Arrays
Store multiples nums as!
arr = [1,2,3,4+3i]
Operations
[1,2,3]+[4,5,6] #Merge arrays with operator '+'
arr[0] #Access to array data (index start in 0)
arr[-1] # Yes! you can use negative numbers to get data of right to left
arr[0] = 3 # Change array values
Duplicate arrays
x = y = [1,2,3] #Copy same reference
x = [1,2,3] #To make different arrays merge second array with empty array
y = x+[ ] # x and y are different arrays with same values
Loops,conditions and logic operatos!
Now you can use logical operators (or, and, not,!=,<=,>=,==) for loops and conditions
Fix bugs
Fix bug when variable is not defined (core dumped)
Fix initcode when exist syntax error (virtual machine save previous value)
Virtual machine
Create a "Virtual machine" like hoc 4.
A scientific calculator
Complex calc va1.3
Features:
- Add variales!
- Add functions sen,cos,log,abs
- Add symbol table
- Constants PI,E,PHI,GAMMA,DEG
va1.2
Complex cal v1
va1.0
Complex cal v1