Sunteți pe pagina 1din 11

Diagramas de flujo, arreglos y dems

Por; Jos Armando Ramrez Martnez

Diagrama de flujo

Los diagramas de flujo son una manera de representar visualmente el flujo de datos a travz de sistemas de tratamiento de informacin. Los diagramas de flujo describen que operacines y en que secuencia se requieren para solucionar un problema dado.

Aqu hay un ejemplo

SQRT en MSW Logo


Outputs the square root of the input, which must be nonnegative.

Array

The required arglist argument is a comma-delimited list of values that are assigned to the elements of the array contained within the Variant. If no arguments are specified, an array of zero length is created. Remarks The notation used to refer to an element of an array consists of the variable name followed by parentheses containing an index number indicating the desired element. In the following example, the first statement creates a variable named A as a Variant. The second statement assigns an array to variable A. The last statement assigns the value contained in the second array element to another variable.

Dim A As Variant A = Array(10,20,30) B = A(2) The lower bound of an array created using the Array function is determined by the lower bound specified with the Option Base statement, unless Array is qualified with the name of the type library (for example VBA.Array). If qualified with the type-library name, Array is unaffected by Option Base. Note A Variant that is not declared as an array can still contain an array. A Variant variable can contain an array of any type, except fixed-length strings and user-defined types. Although a Variant containing an array is conceptually different from an array whose elements are of type Variant, the array elements are accessed in the same way.

Array en MSW Logo

Outputs an array of size elements (must be a positive integer), each of which initially is an empty list. Array elements can be selected with ITEM and changed with SETITEM. The first element of the array is element number 1, unless an origin input (must be an integer) is given, in which case the first element of the array has that number as its index. (Typically 0 is used as the origin if anything.) Arrays are printed by PRINT and friends, and can be typed in, inside curly braces; indicate an origin with {a b c}@0. array:(ARRAY) Newly formed array. size:(INTEGER) Size of the new array. origin:(INTEGER) Where to start indexing the new array.

Example:

make "myarray (array 3 0) setitem 2 :myarray 1 setitem 1 :myarray 2 setitem 0 :myarray 3 show :myarray {3 2 1}

MDArray

Outputs a multi-dimensional array. The first input must be a list of one or more positive integers. The second input, if present, must be a single integer that applies to every dimension of the array. mdarray:(MDARRAY) Newly formed multi-dimensional array. sizelist:(LIST) List of sizes (each an integer) of the new multi-dimensional array. origin:(INTEGER) Where to start indexing the new multidimensional array.

Example:

make "myarray (mdarray [2 3] 0) mdsetitem [0 0] :myarray 1 mdsetitem [0 1] :myarray 2 mdsetitem [0 2] :myarray 3 mdsetitem [1 0] :myarray 4 mdsetitem [1 1] :myarray 5 mdsetitem [1 2] :myarray 6 show :myarray {{1 2 3} {4 5 6}}

S-ar putea să vă placă și