Friday, January 18, 2008

Sony The Ht-ddw7500 Mu.te.ki System Price

WinDev 12 - Splitter a string into an array

Here is a procedure that puts the values of a string separated by a separator defined in a table:

/ / Summary: To fill an array of string from a string and a separator

/ / Syntax:

/ / [ =] Split (string is, is string [, boolean is [, is int]])

/ /

/ / Parameters:

/ / sChaineCara (string): String to splitter

/ / sSeparateur (string): The separator to use

/ / bTrié (boolean - default = 0): False (default) the table is not sorted, true to have a sorted array

/ / PType (integer - default = 1): Type of sorts: ttCroissant or ttDécroissant

/ / Return Value:

/ / Table: / / array containing the values of the string passed as parameter.

/ /

/ / Example:

/ / tabSP is a dynamic array of 0 chains

/ /

/ / tabSP = Split ("foo; abc; zoro; aab; tata ",";", True, ttCroissant)

PROCEDURE Split (s ChaineCara is a string, s Separateur is a string, b Sorted is a Boolean = False , PType is an integer = ttCroissant )

tab Split is a dynamic array of 0 chains

s is a string / / loop variable

FOR ANY CHAIN s OF s ChaineCara SEPARATED BY s Separateur

TableauAjouteLigne ( tab Split , s)

END

IF b Sorted THEN

IF PType = 0 THEN PType = ttCroissant

TableauTrie ( tab Split , PType )

END

RETURN tab Split

Example usage

tab SP is a dynamic array of 0 chain

tab SP = Split ( "foo, abc, zoo; aab; tata , ";" , True , ttCroissant )

Tuesday, January 15, 2008

Cabin Crew Gain Weight

WinDev 12 - Using MesParamètres

This instruction allows WLanguage pass as parameters to a procedure that is desired by the operator *.

Example:

PROCEDURE Calculation (pParam1, *)

* In this procedure represents the other possible parameters.

These optional parameters are accessible via the instruction MesParamètres.

The most interesting, with this statement is that it can access properties of an object. For example if you want to change the visibility of a column in a global procedure can Pass in the procedure the full name of the column:

Example code:

/ / code of a button
ModInterface ( Fen_Fenêtre1.Table1.Col_Colonne1, false)

PROCEDURE ModInterface (*)

MesParamètres [1] .. visible = MesParamètres [2]