Policy: Scripting Command Page Syntax – Talk
Proposal:
Values and commands are written with leading lowercase
Types are written with leading uppercase.
Syntax line:
The parameters should be specified as names only, with types specified below, like this:
Syntax: a min b
Parameter 1: a: Number
Parameter 2: b: Number
In the syntax line the parameter names are plain text, command is written bold.
What to do with array parameters?
--Suma 10:36, 6 September 2007 (CEST)
Currently Mikero seems to be doing a lot of work changing docs into a different syntax, like:
- Object = nearestObject Position
- Object = nearestObject [ Position, "ClassType"]
- Object = nearestObject [ Object, "ClassType"]
What I do not like about this is arguments are not named, only their type is given, which seems confusing to me. However, it is clear such syntax is more concise and leads to shorter definitions. Still, I think it is not informative enough and I am against using it. Based on my proposal, this should look something like:
- object = nearestObject [ position]
- object = nearestObject [ position, classType]
- object = nearestObject [ sourceObject, classType]
sourceObject: Object
object: [[Object]
position: Position
classType: String
--Suma 11:02, 6 September 2007 (CEST)