pChar is the character(s) to set. This can take the form of a single
character such as 'A', a list of characters such as "1234567890", or
a range of characters such as {"a", "z"}.
pSet is either a single CharType code or a list of CharType codes.
See Also: ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
See Also: addToCType, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
See Also: addToCType, ansiLower, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
This is primarily used to add routines to an internal list so that w32start.ew can automatically find event handlers. However it can be used to link a text string to a routine_id, and later you can use w32routine_id() to retrieve the routine_id given the text string. For instance, this routine has been used extensively to enable a sub include file to call a routine in another file without making the routine global, nor its routine_id.
Example:
registerRoutine("Click_BigButton", routine_id("Click_BigButton")) registerRoutine("MainAction", routine_id("Click_BigButton"))rid = w32routine_id("MainAction") if rid != -1 then call_proc(rid, { . . . }) -- This calls Click_BigButton procedure. end if
See Also: addToCType, ansiLower, ansiUpper, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
pChar is the character(s) to set. This can take the form of a single
character such as 'A', a list of characters such as "1234567890", or
a range of characters such as {"a", "z"}.
pSet is either a single CharType code or a list of CharType codes.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
new_mark is either '.', ',', w32DECIMAL_DOT, w32DECIMAL_COMMA or w32GetValue. Negative values are considered to be w32GetValue, positive unknown value are assumed to be w32DECIMAL_DOT. If the new mark is not w32GetValue, the new mark becomes the decimal mark w32TextToNumber() will use. The former value is always returned.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Example
sequence s atom aa = w32abs(-1) -- = 1 s = w32abs({-2,-1,{-1,0,1},1,2}) -- = {2,1,{1,0,1},1,2}
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
If data is not homogeneous, or weight is a sequence and has a sequence element, or the supplied weight is 0, or the sum of supplied weights is 0, then an "absurd" value is returned: 0 if data[1] is a sequence, else {}./n Extra data or weights are discarded./n If data or weight is an empty sequence, 0 is returned.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
pChar is the character(s) to check. This can take the form of a single
character such as 'A', a list of characters such as "1234567890", or
a range of characters such as {"a", "z"}.
pSet is either a single CharType code or a set of codes.
See w32SetCType for a complete list of valid CharType codes.
w32True is returned only if the character belongs to all sets pSet refers to.
Only single byte characters are supported.
Example:
if w32CType( text[i], Alpha_CT) then ... process an alphabetic char elsif w32CType( text[i], Digit_CT) then ... process an digit char end if
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
This creates a one way hash based on the values of PlainText, Mask and Size.
PlainText is usually a password entered in by a user.
Mask is anything your application wishes to use to ensure that two identical
PlainText values will generate different outputs. For example if this is
used for passwords, the Mask could be the user's ID. Thus two people that
just happen to have the same password cannot know that just by looking at the
output of this function.
Size is the number of encoded characters you wish returned. This can be
any positive integer. The larger the Size the less chance that two different
PlainText - Mask combinations will generate the same output. Values
from 16 to 64 would be sufficient in nearly all cases.
Example:
sequence lCode lCode = w32Encode(PasswordText, UserID, 16)
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
The returned lists have the same length:
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
The list must be a sequence of sequences. That is, each element in list must be a sequence containing at least one element. The key is the first element in each sub-sequence of list.
Example:
-- find a value from a list constant aList = { {"red", 17}, {"blue", 10}, {"orange", 299}, {"black", 0} } integer at at = w32findKey( "orange", aList ) -- 'at' should now equal 3. at = w32findKey( "white", aList ) -- 'at' should now equal 0.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
The element parameter specifies which sub-elements are to be inspected.
Example:
-- find a value from a list constant aList = { {"red", {17, 1, "ap"}}, {"blue", {10,3,"ef"}}, {"orange", {299, 9, "op"}}, {"black", {0,4, "yz"} } } integer at at = w32findKey( "op", aList, {2,3} ) -- 'at' should now equal 3. at = w32findKey( 10, aList, {2,1} ) -- 'at' should now equal 2. at = w32findKey( "gh", aList, {2,3} ) -- 'at' should now equal 0.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
pChar is the character(s) to check. This can take the form of a single
character such as 'A', a list of characters such as "1234567890", or
a range of characters such as {"a", "z"}.
Example:
object lRC -- Returns an integer containing the CharType Codes for 'a' lRC = w32GetCType('a') -- Returns a sequence containing the CharType Codes for 'a', '1' and '$' lRC = w32GetCType("a1$")
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Typically used to extract which bits have been set on in a flag.
Example:
-- combine flags integer flags sequence codes codes = w32get_bits( origflag ) if find(WS_EX_CLIENTEDGE, codes) then setText(statusarea, "Client Edge has been specified") end if
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Example:
integer y y = w32hi_word( bigval )
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Example
msg = sprintf("%s: %s", { w32iff(ErrType = 'E', "Fatal error", "Warning"), errortext } )
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
The new element becomes the pos
This routine also handles positions less than 1. If pos < 1 then it will be changed to length(list)+pos+1, meaning that a value of 0 will add to the end of the list, -1 just before the end, etc... If the recalculated pos is less than 1 then the element is added to the front of the list.
Example
-- Insert the name 'fred' before the 3rd element in the list. nameList = w32insertElement(nameList, 3 , "fred")
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
If the w32DELIM_FIRST flag is set, the returned string will start by the delimiter. If the w32DELIM_LAST flag is set, the returned string will end with the delimiter.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
This searches pSource for pItem and if found, it returns the
corresponding element from pTarget.
If pItem is not found in pSource, then what is returned depends
on a few things.
If pTarget is longer than pSource then the last element in
pTarget is returned. This implements a way to return a default
value of your choosing.
If pTarget is not longer than pSource then if the first element
of pTarget is an atom then zero is returned; otherwise an empty
sequence is returned. If pTarget is empty, then 0 is returned.
Examples:
x = w32lookup('a', "cat", "dog") --> 'o' x = w32lookup('d', "cat", "dogx") --> 'x' x = w32lookup('d', "cat", "dog") --> 0 x = w32lookup("ape", {"ant","bear","cat"}, {"spider","seal","dog"}) --> "" x = w32lookup("ant", {"ant","bear","cat"}, {"spider","seal","dog"}) --> "spider"
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Example:
integer y y = w32lo_word( bigval )
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
checking if s is well ordered. position it would have if inserted. verif is nonzero if it is desired to check whether s is increasing or decreasing. A value of 0 skips the check. 0 is returned if the check fails. If x would be inserted at the end of s, -1-length(/i s) is returned. If s is {}, 0 is returned. If s has length 1, it is assumed to be increasing.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
example:
atom flags flags = w32or_all({WS_CHILD, WS_VISIBLE, WS_BORDER})
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Typically used to encode a message parameter into a 32 bit word.
Example:
-- pack min and max into parameter integer y lParam = w32pack_word( min, max )
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
r1 or r2 may be atoms, in hich case they are RAM addresses to peek4s() a rectangle from.
If r1 or r2 is not a sequence of four signed integers, nor an atom, then {} is returned.
If the left position is not less than the right position, or the top position is not less
than the bottom position, for any of the rectangles, {} is returned if typechecking was requested.
Otherwise, the returned sequence has length 3:
Note that the whole type checking is performed if typecheck is not zero, and skipped for speed if it is zero.
All rectangles are given {left,top,right,bottom}.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
remainder() returns a result which has the sign of a.
This function extends to sequences.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
If index is greater than the list length, the list is returned intact. If index is less than 1, it represents the end of the list PLUS the index. So an index of '-1' means the second-last element.
Example:
-- Remove the 4th element from the Name List nameList = w32removeIndex( 4, nameList ) -- Remove the last element. nameList = w32removeIndex( 0, nameList )
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Example
-- Remove the name 'fred' from the list. nameList = w32removeItem("fred", nameList)--------------------------------------------------------------------------
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Note this routine will not do recursive replacements. That is, if pNew contains pOld, it doesn't go into a never-ending loop.
Example:
sequence lRes lRes = w32replaceItem("a;b;c;d;e", ";", " ; ") -- gives "a ; b ; c ; d ; e" lRes = w32replaceItem("The ^^ word is correct", "^^", "third") -- gives "The third word is correct"
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
This function extends to sequences, except for the flag argument.
The way the rounded value is reckoned from a is defined by flag. Supported values are:
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
This can only find routines that have been registered via registerRoutine() and is used by w32Start.ew to automatically set handlers based on the standard naming convention for event handlers.
Example:
integer id id = w32routine_id( EventType & "_" & ControlName )
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
pChar is the character(s) to set. This can take the form of a single
character such as 'A', a list of characters such as "1234567890", or
a range of characters such as {"a", "z"}.
pSet is either a single CharType code or a list of CharType codes.
The valid CharType codes are ...
You may define new character sets: the associated value must be a power of 2 greater than #8000 and less than #20000000.
Example:
w32SetCType( 255, User1_CT) -- Single char w32SetCType( {"n","z"}, User3_CT ) -- Range of chars w32SetCType( "13579", User2_CT ) -- List of chars
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Typically used to decode Win32 message values
Example:
-- Mouse Position sequence hilo, x, y lohi = w32unpack_dword( lParam ) x = w32shortInt(lohi[2]) y = w32shortInt(lohi[1])
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
Typically used to decode Win32 message values when several values are packed into a single number.
Example:
-- extract the low portion from lParam integer x x = w32signed_word( lParam )
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
pSource is the sequence from which to extract the substrings.
pDelim is the delimiter character, delimiter string, or a set of
single character delimiters.
Note 1 - if pDelim is an atom and not equal to '{' then sections
of text enclosed in matching '{' and '}' are not scanned.
Note 2 - if pDelim is a single string inside a sequence, then
it is considered to be a set of delimiter characters and any one of
them can delimiter the pSource. The results in this case are that
each delimitered text is followed by the sequence containing the
character that caused the delimitation. A final empty sequence means
that no delimiter was found to end the pSource text.
Example:
sequence result result = w32split("if abc = def then xyz()", ' ') ? result -- Should be {"if","abc","=","def","then","xyz()"}-- Example of embedded delimiter... result = w32split("event=Click,font={Courier,12}", ',') ? result -- Should be {"event=Click","font={Courier,12}"}
-- Example of delimiter set... result = w32split("event=Click,font={Courier,12}", {"=,{}"}) ? result -- Should be {"event","=","Click",",","font","=","","{","Courier",",","12","}"}
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
If the text contains invalid characters, zero is returned.
Note 1: You can supply Hexadecimal values if the value is preceded by a '#' character, Octal values if the value is preceded by a '@' character, and Binary values if the value is preceded by a '!' character. With hexadecimal values, the case of the digits 'A' - 'F' is not important. Also, any period character embedded in the number is used with the correct base.
Note 2: Any underscore characters or thousands separators, that are embedded in the text number are ignored. These can be used to help visual clarity for long numbers. The thousands separator is ',' if the decimal mark is '.' (the default), or '.' if it is ','. You inspect and set it using setDecimalMark().
Note 3: You can supply a leading or trailing, minus or plus sign.
Note 4: You can supply trailing percentage sign(s). Each one present causes the resulting value to be divided by 100.
Note 5: Any single currency symbol to the left of the first digit is ignored. A currency symbol is any character of the string: "$£¤¥€". A currency symbol may have no digit before it, and must be followed by a dot or digit. If there is none, a single trailing currency sign will be ignored, but there must not be any digit past it.
Note 6: Leading characters may appear in any order and be mixed. Only the sign or base symbol further inside is taken into acount.
This function can optionally return information about invalid numbers. If text has the form of {sequence, integer} then if the integer is nonzero, a sequence is returned. The first element is the value converted, and the second is the position in the text where conversion stopped. If no errors were found then this is zero.
sequence rc atom val rc = w32TextToNumber({"12.34a", 1}) -- rc ---> {12.34, 6} -- Error at position 6 rc = w32TextToNumber({"12.34", 1}) -- rc ---> {12.34, 0} -- No errors.val = w32TextToNumber("12.34a") -- val ---> 0
val = w32TextToNumber("#f80c") --> 63500 val = w32TextToNumber("#f80c.7aa") --> 63500.47900390625 val = w32TextToNumber("@1703") --> 963 val = w32TextToNumber("!101101") --> 45 val = w32TextToNumber("12_583_891") --> 12583891 val = w32TextToNumber("12_583_891%") --> 125838.91 val = w32TextToNumber("12,583,891%%") --> 1258.3891
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32to_string, w32trim, w32trim_left, w32trim_right, w32unpack_dword
-------------------------------------
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32trim, w32trim_left, w32trim_right, w32unpack_dword
pSource is the sequence from which to remove whitespace.
If pSource is enclosed in quotes (single or double) they are
removed. This is a way to force leading and/or trailing whitespace
Example:
sequence result result = w32trim(" abc def ") ? result -- Should display "abc def" result = w32trim("\" abc def \"") ? result -- Should display " abc def "----------------------------------------------------
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim_left, w32trim_right, w32unpack_dword
pSource is the sequence from which to remove whitespace.
Example:
sequence result result = w32trim_left(" abc def ") ? result -- Should display "abc def "
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_right, w32unpack_dword
pSource is the sequence from which to remove whitespace.
Example:
sequence result result = w32trim_right(" abc def ") ? result -- Should display " abc def"
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32unpack_dword
Typically used to decode Win32 message values.
See Also: addToCType, ansiLower, ansiUpper, registerRoutine, removeFromCType, setDecimalMark, w32abs, w32average, w32CType, w32Encode, w32extract_formats, w32findKey, w32findKeyEx, w32GetCType, w32get_bits, w32hi_word, w32iff , w32index, w32index_by, w32insertElement, w32join, w32lookup, w32lo_word, w32ordered_find, w32or_all, w32pack_word, w32rectangle_delta, w32remainder, w32removeIndex, w32removeItem, w32replaceItem, w32round, w32routine_id, w32SetCType, w32shortInt, w32signed_word, w32split, w32TextToNumber, w32to_string, w32trim, w32trim_left, w32trim_right