Вы находитесь на странице: 1из 4

H.1 General Functions exit Termina una secuencia de comandos DPL inmediatamente.

GetTime devuelve el tiempo del procesador actual. GetLanguage Devuelve el idioma actual. GetGlobalLib Devuelve una carpeta de la biblioteca global Random Devuelve un nmero aleatorio al azar. SetRandSeed Inicializa el generador de nmeros aleatorios. fRand devuelve nmeros estocsticos de acuerdo con una distribucin de probabilidad.

exit
exit () El exit () comando termina un script DPL inmediatamente. Si llama dentro de un subndice, slo el propio subndice se dar por terminado. En este caso, la ejecucin continuar en el guin padre que llama.Arguments: The exit()comando no tiene ms argumentos. Return value: The exit() command has no return value. Example: int in; int sum; ! resume todos los nmeros introducidos while(1){ input(in, Introduce un numero (<0 to stop)'); if (in < 0){ ! nmero negativo introducido, suma as calc y detener printf('Sum: %d', sum); exit(); !terminate script here }aqui sum += in; }

int GetTime (int iN) Devuelve el tiempo de procesador actual Arguments: int iN (obligatory) : precisin despus del punto decimal Return value: Tiempo de procesador actual en segundos

H.2 Input / Output Functions and Methods


H.2 Input / Output Funciones y Mtodos Writing into the Output Window Additional Functions related to input/output Writing to Files SetDesktop Methods See also: String Functions

Escribiendo en la ventana de resultados Funciones adicionales relacionados con la entrada / salida Escribir en archivos Mtodos SetDesktop Vase tambin: Funciones de cadena

H.2.1 Writing into the Output Window


ClearOutput Limpia la ventana de resultados. printf Devuelve una cadena con formato. Write Escribe un informe. Error Emite un error de formato. Warn Emite una alerta formato. Info Emite una informacin formateada SetLineFeed Establece el avance de lnea automtico para "printf ()''.

ClearOutput
void ClearOutput () ClearOutput () Limpia la ventana de resultados.Arguments: none Return value: void (no return value) Example: El siguiente comando elimina la ventana de resultados.
ClearOutput();

printf
void printf (String Format, String T | double X | int I, ...) Emite una cadena con formato. El comando printf () usa el C + + printf () sintaxis de formato. Arguments: String Format (obligatory): The format string String T (optional): string argument double X (optional): double argument int I (optional): int argument Return value: void Example: See the format string syntax for examples and more information. The output format is defined by the format string. The passed arguments and the passed format string must match. An error message will be produced when, for instance, a format string for two strings is used together with three doubles. The 'printf' will automatically insert a line-break after printing by default. This means that the next 'printf' will start on the next line. The automatic line-break can be disabled by using the "SetLineFeed''-function. Consulte la sintaxis de formato de cadena de ejemplos y ms informacin.

El formato de salida est definida por la cadena de formato. Los argumentos que se pasan y la cadena de formato aprobado deben coincidir. Un mensaje de error se produce cuando, por ejemplo, una cadena de formato de dos cadenas se utiliza junto con tres dobles. El 'printf' inserta automticamente un salto de lnea despus de imprimir de forma predeterminada. Esto significa que el prximo 'printf' comenzar en la lnea siguiente. El salto de lnea automtico puede desactivarse mediante la opcin "SetLineFeed''-funcin.

Вам также может понравиться