Jump to content

no return value question?


Recommended Posts

What UDF?

This one for example.

$value = _test()
$size = StringLen($value)
MsgBox(0, 'Return', 'Value = ' & $value & @CRLF & 'Size = ' & $size)

Func _test()
EndFunc

I am not sure when it changed from "" to 0.

I consider it as a bug as 0 is something except as being used within a number condition.

Edit:

VBScript Function behavior returns "" as an indicator of expected default return behavior.

value = test()
size = Len(value)
MsgBox "Value = " & value & vbCRLF & "Size = " & size, 0, "Return"

Function test()
    'test = 0
End Function
Edited by MHz
Link to comment
Share on other sites

What UDF?

just like _GUICtrlListView_ClickItem or _GUICtrlTreeView_ClickItem, and it's too diffcult to control the output value with the WM_NOTIFY, so I can get a value by msgbox, but can not to identify the value's accuracy

Edited by netegg
Link to comment
Share on other sites

just like _GUICtrlTreeView_ClickItem

To use the function you just call it with the parameters you need.

Maybe you could explain a bit more about your problem or what it is you don't understand.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...