SRL Archive - SRL Suggestions

WithdrawItem()


slushpuppy

2012-10-07 01:51:45

(*
WithdrawItem
~~~~~~~~~~~~

.. code-block:: pascal

function WithdrawItem(Ident: integer; IdentType: string; Amount: integer;
UpText: TStringArray; Tol: TIntegerArray): boolean;

Withdraws an item using WithdrawItemEx, but removes the Index check.

.. note::

Author: Nava2
Last Modified: Unknown

Example:

.. code-block:: pascal

if WithdrawItem(theColor, 'color', 27, ['ew log', 'ew l'], [3]) then
CloseBank;
*)
function WithdrawItem(Ident: integer; IdentType: string; Amount: integer; UpText: String; Tol: TIntegerArray): boolean;

The function parameter, uptext: String, should reflect its documentation

P1ng

2012-10-07 02:15:40

I don't really understand what the issue is here. Is it that the documentation says it should be a TStringArray but the actual function only uses a single string?

riwu

2012-10-07 02:26:50

Yeah basically the doc is slightly inaccurate.
It should be 'doc should reflect the actual function', rather than the other way round lol.

IMO WithdrawItemEx should use TSA instead, and since it doesn't you will have to edit it (WaitUpText>WaitUpTextMulti in the function) to use TSA. (Or send a pull request)

slushpuppy

2012-10-07 06:27:10

From: riwu
Yeah basically the doc is slightly inaccurate.
It should be 'doc should reflect the actual function', rather than the other way round lol.

IMO WithdrawItemEx should use TSA instead, and since it doesn't you will have to edit it (WaitUpText>WaitUpTextMulti in the function) to use TSA. (Or send a pull request)


I agree with you, however

Having TSA expands the capabilities of withdrawex, hence the reason why I suggested it should be in place instead of String:garfield: