Contains miscellaneous utility routines and variables used in the Lazarus IDE and LCL.

lazutilities.pas is part of the LazUtils package.

Specifies a Boolean function type used to implement the GetSkipCheckByKey and SetSkipCheckByKeyProc routines.

The function type includes the AKey string argument which contains the key value to locate in the function. TGetSkipCheckByKey is used in the Lazarus IDE to implement a routine which checks command line parameters for a language identifier.

Added in LazUtils version 3.0.
Gets and executes the function assigned to an implementation variable using the specified argument. Added in LazUtils version 3.0. True if a function was assigned to the implementation variable, executed in the routine, and returned True. Otherwise, False. Value Sets the value for an implementation variable to the specified function. Added in LazUtils version 3.0. Function type assigned to the implementation variable. Ensures that the specified object instance is freed and set to Nil. FreeThenNil is a procedure used to ensure that the object instance in obj is freed and set to Nil. If obj has been assigned, it is cast to a TObject instance and its Free method is called. Finally, the pointer to the address in obj is set to Nil. Object instance modified in the routine. Gets the relative order for the specified Pointers.

ComparePointers is an Integer function used to get the relative order for the specified Pointer values. The following return values are used in the routine:

1
Returned when p1 > p2.
0
Returned when p1 = p2.
-1
Returned when p1 < p2.
Numeric value with the relative order for the compared Pointers. Pointer compared in the routine. Pointer compared in the routine. Compares the specified Boolean values.
0
Returned when b1 and b2 have the same value.
1
Returned when b1 is True.
-1
Returned as the default value (when b1 is False).
Numeric value for the comparison. Boolean value compared in the routine. Boolean value compared in the routine. Gets the ordinal position for an enumeration value with the specified name.

GetEnumValueDef is an Integer function used to get the ordinal position in the specified enumeration type insformation for the value with the given name.

The return value contains the ordinal position in TypeInfo for the enumeration value with the given Name. GetEnumValueDef calls GetEnumValue to find the value in Name in the type information. If the return value is -1, an enumeration value with the specified name is not found in TypeInfo and the value in DefaultValue is used as the return value.

GetEnumValue PTypeInfo
Ordinal position for the enumeration value with the specified name. Pointer to the type information examined in the routine. Name for the enumeration value to locate in TypeInfo. Default ordinal position for the enumeration value used when Name is not found. Rounds the specified Extended value to an Integer value.

Calls Round to round the Extended value, and casts the result to the Integer type used as the return value.

Integer value for the rounded numeric value. Extended type rounded and converted in the routine. Rounds the specified Extended value to a Cardinal value.

Calls Round to round the Extended value, and casts the result to the Cardinal type used as the return value.

Cardinal value for the rounded numeric value. Extended type rounded and converted in the routine. Truncates the extended value and returns an Integer type. Integer type with the truncated value. Extended value truncated and converted in the routine. Truncates the extended value and returns a Cardinal type. Cardinal type with the truncated value. Extended value truncated and converted in the routine. Converts the specified string value to a Double type.

Calls StrToFloat to convert the value in s, and casts the result to the Double data type used as the return value.

Double type with the converted value. String value converted in the routine. Implements a merge/sort algorithm for a list of pointers with the given length. PPointer to the list of items examined in the merge/sort routine. PtrInt with the length for the List argument. TListSortCompare routine used to compare items for the merge/sort algorithm. Level of detail displayed in IDE console output windows.

ConsoleVerbosity is an Integer variable which indicates the level of detail output from tools like pas2js and CodeTools. ConsoleVerbosity enables debugger output for specific levels of detail.

-1
Quiet
0
Normal verbosity (No debugger output)
1
Verbose (Debugger output enabled)
2
Very verbose (Debugger output enabled)