Policy: Scripting Command Page Syntax – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Fixed formatting)
m (Added titles)
Line 1: Line 1:
Proposal:
===Proposal===


Values and commands are written with leading lowercase
Values and commands are written with leading lowercase
Line 21: Line 21:
--[[User:Suma|Suma]] 10:36, 6 September 2007 (CEST)
--[[User:Suma|Suma]] 10:36, 6 September 2007 (CEST)


===Type only alternative===
Currently Mikero seems to be doing a lot of work changing docs into a different syntax, like:
Currently Mikero seems to be doing a lot of work changing docs into a different syntax, like:


Line 35: Line 36:
sourceObject: [[Object]]
sourceObject: [[Object]]


object: [[Object]
object: [[Object]]


position: [[Position]]
position: [[Position]]

Revision as of 10:03, 6 September 2007

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)

Type only alternative

Currently Mikero seems to be doing a lot of work changing docs into a different syntax, like:

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)