1; Taken from https://www.autoitscript.com/autoit3/docs/intro/lang_functions.htm 2 3#include <Constants.au3> 4#include<GUIConstantsEx.au3> 5#include "WindowsConstants.au3" 6 7Local $iNumber = 10 8Local $iDoubled = 0 9 10For $i = 1 To 10 11 $iDoubled = MyDouble($iNumber) 12 MsgBox($MB_OK, "", $iNumber & " doubled is " & $iDoubled) 13 $iNumber = $iDoubled 14Next 15Exit 16 17#cs 18Func Ignored() 19EndFunc 20#comments-start 21Func Ignored0() 22EndFunc 23#comments-end 24Func Ignored1() 25EndFunc 26#ce 27 28#Region All functions 29Func MyDouble($iValue) 30 $iValue = $iValue * 2 31 Return $iValue 32EndFunc ;==>MyDouble 33 34func MyDouble0($iValue) 35 Local $iSomething = 42 36 $iValue = $iValue * 2 37 Return $iValue 38EndFunc ;==>MyDouble 39 40 FUNC MyDouble1($iValue) 41 $iValue = $iValue * 2 42 Return $iValue 43EndFunc 44 45Volatile Func MyVolatileDouble ($iValue) 46 Return $iValue * 2; 47EndFunc 48 49FUNC MyDummy($iValue) 50 LOCAL STATIC $iFirst = 0 51 STATIC LOCAL $iSecond = 1 52 RETURN $iValue * $iSecond + $iFirst 53ENDFUNC 54#EndRegion All functions 55