** defFunc **

defFunc - ISPPY Wiki

# OVERVEIW

The defFunc command allows the user to make a function they can call later using 'runFunc'


# SYNTAX

To use the defFunc command, type 'defFunc(*INSERT WHAT YOU WANT THE FUNCTION TO BE NAMED HERE*, *WHAT THE FUNCTION DOES (NOT IN QUOTES)*)'

NOTE: If you imported using 'import Lang' then you have to do 'defFunc(*INSERT WHAT YOU WANT THE FUNCTION TO BE NAMED HERE*, *WHAT THE FUNCTION DOES (NOT IN QUOTES)*)'

# HOW THIS IS ACCOMPLISHED IN PYTHON

This command is made by having a "function" with 2 input parameters, one for the name of the function it spits out, and one for the actions the function does. The function saves the name and actions inside of a dictonary.


EACH ONE FUNCTION CAN ONLY STORE 1 ACTION AT A TIME!

Next: runFunc Go back home