Diferencia entre revisiones de «Gambas/Conceptos básicos de programación»

Contenido eliminado Contenido añadido
Sin resumen de edición
Sin resumen de edición
Línea 25:
== '''Variables''' ==
 
*=== Declaración ===
*Sintaxis
[STATIC] {PUBLIC|PRIVATE} Identifier [Static array declaration] AS Datatype [=Expression]
STATIC PUBLIC GridX AS Integer
Línea 41 ⟶ 42:
DIM date1 AS Date
 
*Sintaxis
[STATIC] {PUBLIC|PRIVATE} Identifier AS NEW Native Datatype [Array dimensions...]
PUBLIC CONST WORD_MAX AS Integer = 12
Línea 46 ⟶ 48:
PUBLIC Matrix AS NEW Float[3, 3]
 
*=== Asignación ===
Destination = Expression
iVal = 1972
Línea 54 ⟶ 56:
 
== '''Constantes''' ==
*Sintaxis
 
{PUBLIC|PRIVATE} CONST Identifier AS Datatype = Constant value
'''Los tipos de datos de las Constantes pueden ser: Boolean, Integer, Long, Float o String''