
function list
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
with the help of help I have added all the missing functions (check the first post it is huge
) including the xml functions (might as well define them in case people want to overwrite or just need them)

Last edited by Betelgeuse on Sat Dec 08, 2007 8:28 am, edited 1 time in total.
Crying is not a proper retort!
That would be possible but it would have limited usability! Because you can just download the html but php/MySQL is doing all the dynamic things like sorting or filtering.Betelgeuse wrote:hmm how about this lets put it on a website but allow people to download the html files in a pack so they can use them offline.
But still I'm in favor of this idea!
http://xelerus.de || #transcendence @ Freenode || https://www.dropbox.com/referrals/NTMyNTMzNTk
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
hmm lets think of some filters
filter by what it returns (ie I want just things that return strings)
filter by what it has in the argument list
filter by use category (would have to make categories but that is easy)
Description text search
Would have to make pages describing the various types and the argument lists can link to that so people can understand what can go in there. (those pages can have a preset filter showing things that return it or things that have it in its argument list.
Categories should have pages too showing some more advanced examples like insertion into the middle of a list and lists within lists.
filter by what it returns (ie I want just things that return strings)
filter by what it has in the argument list
filter by use category (would have to make categories but that is easy)
Description text search
Would have to make pages describing the various types and the argument lists can link to that so people can understand what can go in there. (those pages can have a preset filter showing things that return it or things that have it in its argument list.
Categories should have pages too showing some more advanced examples like insertion into the middle of a list and lists within lists.
Crying is not a proper retort!
Ok, so how do we do this? Everyone submits a part of it here in this thread and someone sorts it out? Hmm a template of some sort would be welcome here... then I could write a few descriptions of some basic script principles and constructs...
I think before we start gather information we should try to make a plan waht informations we want to display and how we want to display them!
So we have all data on one level which will make it easier to format or use otherwise!
So we have all data on one level which will make it easier to format or use otherwise!
http://xelerus.de || #transcendence @ Freenode || https://www.dropbox.com/referrals/NTMyNTMzNTk
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
well here is a list of data that we need for each one. Can anyone think of anything else?
name
argument list (can someone post a nice format to put this in we need the format before we can supply the data)
what it returns (everything returns something just most return Nil)
category (we need a list of categories)
Description
Example
name
argument list (can someone post a nice format to put this in we need the format before we can supply the data)
what it returns (everything returns something just most return Nil)
category (we need a list of categories)
Description
Example
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
hmm how about for argument list it would just put a ^X after the argument type to mean the last X arguments can be repeated as many times as needed. Each line would be an argument type followed by a description of what it is.
here is an example
Name
objEnumItems
Argument List
object: The space object that you want to look through the items of.
modifiers: A filter saying what kinds of items you want.
variable: A variable used by the function that will contain each of the items that where allowed by the filter.
function: The function that will be applied for each of the items that follow the filter.
Returns
Nil
Category
object, iteration
Description
For each item that passes the filter in this object it will run the function using the variable to contain that item.
Example
This will when run tell the player all the items on the players ship that are installed devices.
Any suggestions on how it can be better.
here is an example
Name
objEnumItems
Argument List
object: The space object that you want to look through the items of.
modifiers: A filter saying what kinds of items you want.
variable: A variable used by the function that will contain each of the items that where allowed by the filter.
function: The function that will be applied for each of the items that follow the filter.
Returns
Nil
Category
object, iteration
Description
For each item that passes the filter in this object it will run the function using the variable to contain that item.
Example
Code: Select all
(objEnumItems gPlayerShip "dI" theItem
(plyMessage gplayer (itmGetName theItem 4))
)
Any suggestions on how it can be better.
Crying is not a proper retort!
- Ttech
- Fleet Admiral
- Posts: 2767
- Joined: Tue Nov 06, 2007 12:03 am
- Location: Traveling in the TARDIS
- Contact:
Like a loop?Betelgeuse wrote:hmm how about for argument list it would just put a ^X after the argument type to mean the last X arguments can be repeated as many times as needed. Each line would be an argument type followed by a description of what it is.
here is an example
Name
objEnumItems
Argument List
object: The space object that you want to look through the items of.
modifiers: A filter saying what kinds of items you want.
variable: A variable used by the function that will contain each of the items that where allowed by the filter.
function: The function that will be applied for each of the items that follow the filter.
Returns
Nil
Category
object, iteration
Description
For each item that passes the filter in this object it will run the function using the variable to contain that item.
ExampleThis will when run tell the player all the items on the players ship that are installed devices.Code: Select all
(objEnumItems gPlayerShip "dI" theItem (plyMessage gplayer (itmGetName theItem 4)) )
Any suggestions on how it can be better.
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
yes it is like a loop because both are iteration functions.
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
It is just an example there are many reasons why you would want to go through every item of a certain type in a space object.
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Name:
add
Syntax:
(add number number)
Argument List:
number: A number you want to add
number: The other number you want to add
Returns:
number: The sum of the two numbers passed
Category:
Math
Description:
Sums up the numbers passed to it and returns the result.
Example:
This code will return the number 3.
Comment:
I am not sure why add only takes two arguments.
add
Syntax:
(add number number)
Argument List:
number: A number you want to add
number: The other number you want to add
Returns:
number: The sum of the two numbers passed
Category:
Math
Description:
Sums up the numbers passed to it and returns the result.
Example:
Code: Select all
(add 1 2)
Comment:
I am not sure why add only takes two arguments.

Last edited by Betelgeuse on Tue Dec 11, 2007 10:00 am, edited 4 times in total.
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Name:
and
Syntax:
(and condition condition^1)
Argument List:
condition: Something other than Nil or Nil
condition: Something other than Nil or Nil
^1
Returns:
condition: the result of anding all of the conditions
Category:
Logical
Description:
Returns True if all the conditions are not Nil otherwise returns Nil.
Example:
This will return a Nil.
Comment:
Logical functions are very important in if and while functions.
and
Syntax:
(and condition condition^1)
Argument List:
condition: Something other than Nil or Nil
condition: Something other than Nil or Nil
^1
Returns:
condition: the result of anding all of the conditions
Category:
Logical
Description:
Returns True if all the conditions are not Nil otherwise returns Nil.
Example:
Code: Select all
(block (someCondition)
(setq someCondition True)
(and someCondition Nil)
)
Comment:
Logical functions are very important in if and while functions.
Last edited by Betelgeuse on Fri Jan 04, 2008 4:28 am, edited 4 times in total.
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Name:
append
Syntax:
(append List List^1)
Argument List:
List: The list you want to start the new list
List: The list you wanted added on to the list.
^1
Returns:
List: A new list containing all the elements of the passed in lists with their order preserved.
Category:
List Operator
Description:
Makes a new list with all the elements of the passed in lists in the order that they came in at.
Example:
Will return the list (a b c d e)
Will return the list (a d b e)
Comment:
The reason why I repeat List in the argument list is because this must have at least two lists.
append
Syntax:
(append List List^1)
Argument List:
List: The list you want to start the new list
List: The list you wanted added on to the list.
^1
Returns:
List: A new list containing all the elements of the passed in lists with their order preserved.
Category:
List Operator
Description:
Makes a new list with all the elements of the passed in lists in the order that they came in at.
Example:
Code: Select all
(append '(a b c) '(d e))
Code: Select all
(append '(a) '(d) '(b e))
Comment:
The reason why I repeat List in the argument list is because this must have at least two lists.
Last edited by Betelgeuse on Tue Dec 11, 2007 10:02 am, edited 1 time in total.
Crying is not a proper retort!
- Betelgeuse
- Fleet Officer
- Posts: 1920
- Joined: Sun Mar 05, 2006 6:31 am
Name:
apply
Syntax:
(apply Function List)
Argument List:
Function: The function you want to run.
List: A list of arguments you want the function to be run with.
Returns:
Whatever the function returns.
Category:
Function Operator (can someone think of a better category for this?)
Description:
Runs the function as though it was called normally using the list as its arguments.
Example:
This will return Nil.
This will return 35.
Comment:
Much more powerful than first appears. Both the function and argument list can vary.
apply
Syntax:
(apply Function List)
Argument List:
Function: The function you want to run.
List: A list of arguments you want the function to be run with.
Returns:
Whatever the function returns.
Category:
Function Operator (can someone think of a better category for this?)
Description:
Runs the function as though it was called normally using the list as its arguments.
Example:
Code: Select all
(block (someArgumentList)
(setq someArgumentList '(True True Nil))
(apply and someArgumentList)
)
Code: Select all
(block (someArgumentList)
(setq someArgumentList '(1 34))
(apply add someArgumentList)
)
Comment:
Much more powerful than first appears. Both the function and argument list can vary.
Last edited by Betelgeuse on Tue Dec 11, 2007 10:04 am, edited 1 time in total.
Crying is not a proper retort!