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 32:
 
== '''Operadores''' ==
=== '''Arithmetic OperatorsAritméticos''' ===
A = NumberNumero1 + NumberNumero2 'Adds''Suma twodos numbersnúmeros''
A =- Numero '''Calcula el signo opuesto de un numero. El cero es el opuesto de el mismo''
A =- Number 'Computes the opposite sign of a number. Zero is the opposite of itself
A = NumberNumero1NumberNumero2 'Subtracts''Resta twodos numbersnúmeros''
A = NumberNumero1 * NumberNumero2 'Multiplies''Multiplica twodos numbersnúmeros''
A = NumberNumero1 / NumberNumero2 '''DividesDivide twodos numbersnúmeros. Una división sobre cero causara un error [A Division By Zero (#26) error will occur if the value of the number to the right of the slash is zero]''
A = NumberNumero ^ PowerPotencia 'Raises''Eleva Numberun tonumero thea poweruna Power.potencia''
A = NumberNumero1 \ NumberNumero2
A = Number1 DIV Number2 '''Calcula el cociente de dos números enteros, truncando el resultado. Una división sobre cero causara un error (#26)''
A = Number DIV Number 'Computes the quotient of the two Integer numbers, truncating the result. A Division By Zero (#26) error will occur if the value of the number to the right of the backslash is zero
A = Numero1 MOD Numero2 '''Calcula el remanente de un cociente de dos numeros. Una división sobre cero causara un error (#26)''
A = Number MOD Number 'Computes the remainder of the quotient of the two numbers. A Division By Zero (#26) error will occur if the value of the number to the right of the operator MOD is zero
 
=== '''ComparisonDe Operatorscomparación''' ===
NumberNumero1 = NumberNumero2 'Returns''Regresa TRUE ifsi twodos numbersnúmeros areson equaliguales''
NumberNumero1 <> NumberNumero2 'Returns''Regresa TRUE ifsi twodos numbersnúmeros areson differentdiferentes''
Number1Numero1 < Number2Numero2 '''ReturnsRegresa TRUE ifsi Number1Numero1 ises strictlyestrictamente lowermenor thanque Number2Numero2''
Number1Numero1 > Number2Numero2 '''ReturnsRegresa TRUE ifsi Number1Numero1 ises strictlyestrictamente greatermayor thanque Number2Numero2''
Number1Numero1 <= Number2Numero2 'Returns''Regresa TRUE ifsi Number1Numero1 ises lowermenor oro equaligual thanque Number2Numero2''
Number1Numero1 >= Number2Numero2 'Returns''Regresa TRUE ifsi Number1Numero1 ises greatermayor oro equaligual thanque Number2Numero2''
'If'' theSi resultel ofresultado ade Comparisonuna iscomparacion assignedes toasignado ana integeruna variable, thenentera, theentonces resultel isresultado eithersera -1 (True) oro 0 (False) ''
 
==='''Assignment Operators''' ===