Diferencia entre revisiones de «Gambas/Referencia Rápida»
Contenido eliminado Contenido añadido
Sin resumen de edición |
Sin resumen de edición |
||
Línea 1:
Nota: Falta traducir algunas partes al español
== '''Data Types''' ==
*Boolean True or false
*Byte 0 to 255
Línea 15:
*Pointer A memory address.
== '''Comments''' ==
'All comments start with an apostrophe
'''Variable Declaration'''▼
▲== '''Variable Declaration''' ==
[STATIC] {PUBLIC|PRIVATE} Identifier [Static array declaration] AS Datatype [=Expression]
STATIC PUBLIC GridX AS Integer
Línea 40:
PUBLIC Matrix AS NEW Float[3, 3]
== '''Class Declaration''' ==
[STATIC] {PUBLIC|PRIVATE} Identifier AS NEW Class (Arguments...)
STATIC PRIVATE Tasks AS NEW List
PRIVATE MyCollection AS NEW Collection(gb.Text)
'''Constant Declaration'''▼
▲== '''Constant Declaration''' ==
{PUBLIC|PRIVATE} CONST Identifier AS Datatype = Constant value
'Constant datatype can be: Boolean, Integer, Long, Float or String.
Línea 54 ⟶ 53:
PRIVATE CONST MAGIC_HEADER AS String = "# Gambas form file"
== '''Assignment''' ==
Destination = Expression
iVal = 1972
Línea 61:
cCollection[sKey] = Name
'''Loop Control Structures'''▼
▲== '''Loop Control Structures''' ==
FOR Variable = Expression TO Expression [STEP Expression]
...
Línea 112:
WEND
'''Test Control Structures & Functions'''▼
▲== '''Test Control Structures & Functions''' ==
Value = Choose (Choice, Result1, Result2 [, ... ])
X = 3
Línea 164:
END SELECT
== '''Operators''' ==
'''Arithmetic Operators'''
A = Number + Number 'Adds two numbers
Línea 194 ⟶ 196:
Variable &/= Expression 'Assignment with path concatenation. This is a synonymous for Variable = Variable &/ Expression
'''Method Declaration''' ▼
▲== '''Method Declaration''' ==
''Procedures''
Línea 226 ⟶ 228:
END
'''Error Management'''▼
▲== '''Error Management''' ==
*DEBUG Prints a debugging message.
*FINALLY Executes a block of code in a function, even if there was an error.
Línea 249 ⟶ 251:
END
== '''Functions''' ==
''String Functions''
*Asc Returns the ASCII code of a character in a string.
Línea 401 ⟶ 404:
''Localization and Translation Functions''
*Format$ Format a number or a date.
*Str$ Converts a number or a date into a string.
|