Jump to content

What UDF means ??


Recommended Posts

Correct. A User Defined Function is a function that you can define in your code to do a task. It is often used so that you can eaisily run a block of code without having to type it out over and over. It can also return a value, and/or accept paramaters into the function. You can create some functions, and put them in a seperate source file so that you can include them in your scripts. That way, you just need to do a #include <FileName.au3> at the top of any script to gain access to any functions defined in that file. The full install of AutoIt also comes with some UDFs that you can use.

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Link to comment
Share on other sites

Yep, it means a user-defined function. The following is an example of a UDF that counts the number of times a character occurs in a string:

Func _StringCount($string, $char)
   Local $i, $count
   For $i = 1 to StringLen($string)
      If StringMid($string, $i, 1) = $char Then $count = $count + 1
   Next
   Return $count
EndFunc
Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!
Link to comment
Share on other sites

Ohhh, ok ok. I know what a user function is. But becausse my native language is spanish and we don't use UDF in coding, I thought It was something different.

Thanx very much to all for your help. :ph34r:

Greetings,

- Alandor -

Link to comment
Share on other sites

  • 2 weeks later...

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...