Kip Posted April 17, 2012 Share Posted April 17, 2012 Now we have function pointers, we're one step closer to inline function declarations. $myCallback = Func($x) MsgBox(0, "", $x) EndFunc $myCallback(8) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
Valik Posted April 17, 2012 Author Share Posted April 17, 2012 We have already discussed unreachable functions. The code should throw an error message but she may not have that error message implemented yet. This should not be possible: Func MyUDF() EndFunc Global MyUDF = "anything" ; Syntax error That is supposed to generate an error with a message along the lines, "Unable to reassign function". This will be possible only due to scoping rules: Func MyUDF() ConsoleWrite("MyUDF()" & @CRLF) EndFunc Func AnotherUDF() Local MyUDF = MyUDF MyUDF() MyUDF = "" ; Can no longer call MyUDF() from this scope EndFunc AnotherUDF() MyUDF() Link to comment Share on other sites More sharing options...
czardas Posted April 17, 2012 Share Posted April 17, 2012 (edited) It's looking very promising. Edited April 17, 2012 by czardas operator64Â Â ArrayWorkshop Link to comment Share on other sites More sharing options...
Shaggi Posted April 17, 2012 Share Posted April 17, 2012 Indeed, that's some very additions. Good job Ever wanted to call functions in another process? ProcessCall UDFConsole stuff: Console UDFC Preprocessor for AutoIt OMG Link to comment Share on other sites More sharing options...
JohnOne Posted April 18, 2012 Share Posted April 18, 2012 Is scite playing nice alongside this alpha version? (I wouldn't even know how to use it) I would imagine obfuscator might not befriend the newer optional syntax so gracefully. AutoIt Absolute Beginners  Require a serial  Pause Script  Video Tutorials by Morthawt  ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Valik Posted April 22, 2012 Author Share Posted April 22, 2012 I've just uploaded a new alpha version. I also uploaded the current documentation source. 3.3.9.5 complete changelog: AutoIt: - Added: Empty arrays. - Added: Functions are now first class objects which means variables can "point" to them and the function can be called through the variable. - Added: The $ prefix for variables is now optional and can be omitted entirely. - Added: Built-in functions that take a callback now be passed directly in addition to the old method of passing as a string. Built-in functions can also be passed now (be careful that the function you pass matches what the caller expects). - Added: C++ style ternary operators: Local bResult = ("foo" = "bar") ? True : False - Fixed: Redim allows initialization to non-array. - Fixed #2166: StringToASCIIArray() and StringFromASCIIArray() did not correctly return an empty string when the start index is greater than the end index. - Fixed #1901: 32-bit compiled scripts now work from the system32 directory on 64-bit Windows. - Changed: Optional square brackets for array declaration with initialization. Au3Check: - Changed: Optional square brackets for array declaration with initialization. There are a couple things I forgot to document on trancexx's behalf. There should now be an error when you attempt to re-assign a function name (the error message will change): Func MyUDF() EndFunc Global MyUDF = "anything" There's also a new feature that is not ready for use and thus is not documented. Some of the MVPs may have noticed it get added but it should not be used until you see it in the documentation. It is subject to change so keep that in mind if you stumble across it. Link to comment Share on other sites More sharing options...
matwachich Posted April 23, 2012 Share Posted April 23, 2012 Just a small question: Does these modifications have any impact on performances??? Thanks Link to comment Share on other sites More sharing options...
Valik Posted April 23, 2012 Author Share Posted April 23, 2012 (edited) Just a small answer: I don't care. It's an alpha. Features have to start somewhere. If you want fast stable code then don't use alpha/beta software. Edited April 23, 2012 by Valik Link to comment Share on other sites More sharing options...
Kip Posted April 23, 2012 Share Posted April 23, 2012 You know what would be really awesome? If function pointers could be passed with COM methods. (Instead of creating a VT_EMPTY variant like it does now) MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API. Link to comment Share on other sites More sharing options...
MvGulik Posted April 23, 2012 Share Posted April 23, 2012 Number() (3.3.8.1)(3.3.9.4)Not sure if this is something that already passed by somewhere else (a long time ago) ... butNumber(Bool, or 'Default') = Double(type) ... Double type output, instead of int(32/64), being intentional? "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
trancexx Posted April 23, 2012 Share Posted April 23, 2012 Number() (3.3.8.1)(3.3.9.4)Not sure if this is something that already passed by somewhere else (a long time ago) ... butNumber(Bool, or 'Default') = Double(type) ... Double type output, instead of int(32/64), being intentional?I'd spank you if I could now.Use normal fucking language. Skitty 1 ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
MvGulik Posted April 23, 2012 Share Posted April 23, 2012 ... I could if I would ... So is that a bonded 'Yes', or a tight up 'No'. "Straight_and_Crooked_Thinking" : A "classic guide to ferreting out untruths, half-truths, and other distortions of facts in political and social discussions.""The Secrets of Quantum Physics" : New and excellent 2 part documentary on Quantum Physics by Jim Al-Khalili. (Dec 2014) "Believing what you know ain't so" ... Knock Knock ... Link to comment Share on other sites More sharing options...
trancexx Posted April 23, 2012 Share Posted April 23, 2012 First one. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted April 23, 2012 Share Posted April 23, 2012 Just a quick question: How does this new version of AutoIT distinguish between variables and other words/identifiers now that the '$' is optional? does it just look it up in a table of keywords? ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
ProgAndy Posted April 23, 2012 Share Posted April 23, 2012 (edited) Just a quick question:How does this new version of AutoIT distinguish between variables and other words/identifiers now that the '$' is optional? does it just look it up in a table of keywords?AutoIt searches in its tables for the name. The order should be this:Assigning a variable: keywords (error if name exists), functions (error if name exists), variablesUsing a variable/keyword: keywords, variables, functionsCalling a function: variables (error if found, but no function reference), functions Edited April 23, 2012 by ProgAndy *GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes Link to comment Share on other sites More sharing options...
Valik Posted April 23, 2012 Author Share Posted April 23, 2012 Why do you care how it does it as long as it works? Link to comment Share on other sites More sharing options...
jchd Posted April 24, 2012 Share Posted April 24, 2012 What's the rationale for making VarGetType(1 = 1) etc. a Real and not Int? It has unexpected consequences (well, in pathalogical uses the help file warns against): ConsoleWrite(VarGetType(0 + (1=1)) & @LF) ConsoleWrite(100000000000000 + (1=1) & @LF) ConsoleWrite(1000000000000000 + (1=1) & @LF) ConsoleWrite((10000000000000000 = 10000000000000000 + (1=1)) & @LF) This wonderful site allows debugging and testing regular expressions (many flavors available). An absolute must have in your bookmarks.Another excellent RegExp tutorial. Don't forget downloading your copy of up-to-date pcretest.exe and pcregrep.exe hereRegExp tutorial: enough to get startedPCRE v8.33 regexp documentation latest available release and currently implemented in AutoIt beta. SQLitespeed is another feature-rich premier SQLite manager (includes import/export). Well worth a try.SQLite Expert (freeware Personal Edition or payware Pro version) is a very useful SQLite database manager.An excellent eBook covering almost every aspect of SQLite3: a must-read for anyone doing serious work.SQL tutorial (covers "generic" SQL, but most of it applies to SQLite as well)A work-in-progress SQLite3 tutorial. Don't miss other LxyzTHW pages!SQLite official website with full documentation (may be newer than the SQLite library that comes standard with AutoIt) Link to comment Share on other sites More sharing options...
Valik Posted April 24, 2012 Author Share Posted April 24, 2012 An incomplete feature that you just reminded me about. Link to comment Share on other sites More sharing options...
twitchyliquid64 Posted April 24, 2012 Share Posted April 24, 2012 Why do you care how it does it as long as it works?I am building systems that mirror the behaviour of the Autoit interpreter. It is easier for me to implement new behaviour if I have some little idea of what goes on under the bonnet. ongoing projects:-firestorm: Largescale P2P Social NetworkCompleted Autoit Programs/Scripts: Variable Pickler | Networked Streaming Audio (in pure autoIT) | firenet p2p web messenger | Proxy Checker | Dynamic Execute() Code Generator | P2P UDF | Graph Theory Proof of Concept - Breadth First search Link to comment Share on other sites More sharing options...
Valik Posted April 24, 2012 Author Share Posted April 24, 2012 Trust me on this: You're wasting your time. Maybe come back and try again in a year. Right now, though? Not such a good time to try that. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now