Diferencia entre revisiones de «Gambas/Referencia Rápida»

Contenido eliminado Contenido añadido
m Deshecha la revisión 223018 de Ralgisbot (disc.)
m Bot: Corrigiendo la sintaxis del código wiki; cambios triviales
Línea 2:
 
== '''Data Types''' ==
* Boolean True or false
* Byte 0 to 255
* Short -32.768 to +32.767
* Integer -2.147.483.648 to +2.147.483.647
* Long -9.223.372.036.854.775.808 to +9.223.372.036.854.775.807
* Single Like the float datatype in C.
* Float Like the double datatype in C.
* Date Date and time, each stored in an integer.
* String A variable length string of characters.
* Variant Any datatype.
* Object Anonymous reference to any object.
* Pointer A memory address.
 
== '''Comments''' ==
Línea 203:
Identifier
(
[[BYREF]] Parameter AS Datatype [[, ...]] [,]
[OPTIONAL [BYREF] Optional Parameter AS Datatype [[, ... ]] [,] [...]
)
...
Línea 217:
Identifier
(
[[BYREF]] Parameter AS Datatype [[, ...]] [,]
[OPTIONAL [BYREF] Optional Parameter AS Datatype [[, ...]] [,] [...]
)
AS Datatype
Línea 230:
 
== '''Error Management''' ==
* DEBUG Prints a debugging message.
* FINALLY Executes a block of code in a function, even if there was an error.
* CATCH Catches an error in a function.
* Error The Error static class.
* TRY Tries to execute a statement, without raising an error.
* ERROR Returns if an error happened, or prints an error message. Returns TRUE if an error has happened. Use it just after a TRY instruction to know if the executed instructions failed.
'Prints a file to the screen
SUB PrintFile(FileName AS STRING)
Línea 254:
== '''Functions''' ==
''String Functions''
* Asc Returns the ASCII code of a character in a string.
* Chr$ Returns a character from its ASCII code.
* Comp Compares two strings.
* InStr Searches a string into another string.
* LCase$ Converts a string to lowercase.
* Left$ Returns the first characters of a string.
* Len Returns the length of a string.
* LTrim$ Strips white spaces from the left of a string.
* Mid$ Returns a part of a string.
* Replace$ Replaces in a string a substring by another one.
* Right$ Returns the last characters of a string.
* RInStr Searches a string into another string from its right.
* RTrim$ Strips white spaces from the right of a string.
* Scan Splits a string against a regular expression pattern.
* Space$ Returns a string containing only space.
* Split Splits a string into substrings.
* String$ Returns the same string concatenated many times.
* Subst$ Substitutes strings in a pattern.
* Trim$ Strips white spaces from a string.
* UCase$ Converts a string to uppercase.
 
''Stream & Input/Output functions''
* CLOSE Closes a stream
* Eof Returns if the end of file is reached.
* ERROR Prints expressions to the error standard output.
* ERROR TO Redirects the standard error output.
* FLUSH Flushes the output of a buffered stream.
* INPUT Reads strings from a text stream and converts them into values.
* INPUT FROM Redirects the standard input.
* LINE INPUT Reads lines from a text stream.
* LOCK Locks an opened stream.
* Lof Returns the length of a stream.
* OPEN Opens a file for reading or writing and creates a stream for it.
* OUTPUT TO Redirects the standard output.
* PIPE Opens a named pipe for reading or writing and creates a stream for it.
* PRINT Prints expressions to a stream.
* READ Reads binary data from a stream.
* SEEK Change the position of the stream file pointer.
* Seek Gets the position of the stream file pointer.
* UNLOCK Unlocks an opened stream.
* WRITE Write binary data to a stream.
 
''File & Directory Functions''
* Access Tests the access authorization of a file.
* COPY Copy a file.
* DFree Returns the free space on a device.
* Dir Browses a directory.
* Exist Checks if a specific file or directory exists.
* IsDir Returns if a path points at a directory.
* KILL Removes a file.
* LINK Creates a symbolic link.
* MKDIR Creates a directory.
* MOVE Renames or moves a file or a directory.
* RDir Browses a directory recursively.
* RMDIR Removes an empty directory.
* Stat Get information about a file.
* Temp$ Makes temporary file names.
 
''Arithmetical Functions''
* Abs Returns the absolute value of a number.
* DEC Decrements a variable.
* Fix Returns the integer part of a number.
* Frac Returns the fractional part of a number.
* INC Increments a variable.
* Int Returns the mathematical integer part of a number.
* Max Returns the maximum number.
* Min Returns the minimum number.
* Round Rounds a number.
* Sgn Returns the sign of a number.
 
''Logarithms & Exponentials Functions''
* Cbr Cubic root
* Exp Exponential, e^x
* Exp2 2^x
* Exp10 10^x
* Expm Exp(x) - 1
* Log Neperian logarithm, base e logarithm
* Log2 Base 2 logarithm
* Log10 Decimal logarithm
* Logp Log(1+x)
* Sqr Square root
 
''Trigonometric Functions''
* ACos Computes the arc cosine of an angle.
* ACosh Computes the hyperbolic arc cosine of an angle.
* Ang Computes the angle polar coordinate from two rectangular coordinates.
* ASin Computes the arc sine of an angle.
* ASinh Computes the hybperbolic arc sine of an angle.
* ATan Computes the arc tangent of an angle.
* ATan2 Computes the arc tangent of two numbers.
* ATanh Computes the hyperbolic arc tangent of an angle.
* Cos Computes the cosine of an angle.
* Cosh Computes the hyperbolic cosine of an angle.
* Deg Converts radians to degrees.
* Hyp Calculate the hypotenuse of a triangle.
* Mag Computes the distance polar coordinate from two rectangular coordinates.
* Pi Returns π or a multiple of π.
* Sin Computes the sine of an angle.
* Sinh Computes the hyperbolic sine of an angle.
* Tan Computes the tangent of an angle.
* Tanh Computes the hyperbolic tangent of an angle.
* Rad Converts degrees to radians.
 
''Random Numbers Functions''
* RANDOMIZE Initializes the pseudo-random number generator.
* Rnd Returns a pseudo-random number.
 
''Date & Time Functions''
* Date Returns a date without its time component.
* DateAdd Adds a period to a given date.
* DateDiff Returns the period between two dates.
* Day Returns the day of a Date value.
* Hour Returns the hours of a Date value.
* Minute Returns the minutes of a Date value.
* Month Returns the month of a Date value.
* Now Returns the current date and time.
* Second Returns the seconds of a Date value.
* Time Returns the time part of a Date value.
* Timer Returns the number of elapsed seconds since the program started.
* Week Returns the week number of a Date value.
* WeekDay Returns the week day of a Date value.
* Year Returns the year of a Date value.
 
''Datatype Functions''
* IsBoolean Returns if an expression is a Boolean value.
* IsByte Returns if an expression is a Byte value.
* IsDate Returns if an expression is a Date value.
* IsFloat Returns if an expression is a Float value.
* IsInteger Returns if an expression is an Integer value.
* IsLong Returns if an expression is a Long value.
* IsNull Returns if an expression is NULL.
* IsNumber Returns if an expression is a number.
* IsObject Returns if an expression is an Object value.
* IsShort Returns if an expression is a Short value.
* IsSingle Returns if an expression is a Single value.
* IsString Returns if an expression is a String value.
* TypeOf Returns the type of the value of an expression.
 
''Character Test Functions''
* IsAscii Tests if a string contains only ASCII characters.
* IsBlank Tests if a string contains only blank characters.
* IsDigit Tests if a string contains only digits.
* IsHexa Tests if a string contains only hexadecimal digits.
* IsLCase Tests if a string contains only lowercase letters.
* IsLetter Tests if a string contains only letters.
* IsPunct Tests if a string contains only printable non-alphanumeric characters.
* IsSpace Tests if a string contains only space characters.
* IsUCase Tests if a string contains only uppercase letters.
 
''Localization and Translation Functions''
* Format$ Format a number or a date.
* Str$ Converts a number or a date into a string.
* Subst$ Substitutes strings in a pattern.
* Tr$ Translate a string.
* Val Converts a string into a number or a date.
 
''Formatting functions''
* Bin$ Format a number in binary.
* Format$ Format a number or a date.
* Hex$ Format a number in hexadecimal.
 
Para mas información visita [http://gambas.sourceforge.net/ http://gambas.sourceforge.net/]