Jump to content

Recommended Posts

Posted
Please think about or do not recognize this change
 
  Quote
3.3.10.0 (23rd December, 2013) (Release)

- Changed: VT_NULL VARIANT converts to Null keyword (previously empty string).

 

as a "script-breaking changes"

 


In my case, it has just been, and still is. 
Especially if you are working on data from MS SQL database. 
 
 
Early enough to use this kind of code:
...
If $value <> '' Then ....
...
Now I need to change many parts of my scripts to something like this:
...
If $value <> '' And $value <> Null Then ....
...

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

If the change is due to bug-fixing then the change can't be script breaking. Did AutoIt's documentation ever suggested conversion from COM variant NULL to internal empty string happens? No.

Old behavior was classified as bug and fixed accordingly when new type was added.

♡♡♡

.

eMyvnE

Posted (edited)
After your explanations, it should be noted that I had some bad habits, and EDIT: life has verified them ;) @trancexx verified them :)
 
Thanks for the clarification 
 
Regards 
mLipok
Edited by mLipok

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

If the return value was changed from "" to NULL then it would be enough to check for NULL. No need to check for "" any longer.

If $value <> Null Then ....

I noticed this "problem" for my AD UDF. But it was quite easy to change :)

My UDFs and Tutorials:

  Reveal hidden contents

 

Posted
Not always. 
For example, in SQL by using 'INNER JOIN', if the table does not have an attached data, the value is NULL, but if the data exists but are empty, then the value is an empty string.

Signature beginning:
Please remember: "AutoIt"..... *  Wondering who uses AutoIt and what it can be used for ? * Forum Rules *
ADO.au3 UDF * POP3.au3 UDF * XML.au3 UDF * IE on Windows 11 * How to ask ChatGPT for AutoIt Codefor other useful stuff click the following button:

  Reveal hidden contents

Signature last update: 2023-04-24

Posted

mLipok,

Are you sure you mean INNER join and not OUTER join?  Which engine does behave like this and can you PM me a short reproducer?

  Reveal hidden contents

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 here
RegExp tutorial: enough to get started
PCRE 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)

  • 3 weeks later...
Posted

Okay this hasn't anything to do with the current Beta, just something I noticed when looking at whether or not to convert from >_FileListToArrayXT to _FileListToArrayRec.

I found in my testing that _FileListToArrayXT was still noticably faster.

Tests where performed on network mapped 7200rpm drives, results reported are after drives are awake & spun up.

Non recursive search on 2,529 files:

_FileListToArrayXT

- 190ms

_FileListToArrayRec

- 268ms

Recursive search on 19,773 files & 954 Folders:

_FileListToArrayXT

- 3.0-3.1 seconds

_FileListToArrayRec

- 3.4-3.5 seconds

Don't get me wrong both are bloody fast...but maybe there is something to be learned from _FileListToArrayXT that could help speed up _FileListToArrayRec.

Anyways food for thought.

Non Recursive Code:

#include <File.au3>
#include <_FileListToArrayXT.au3>

$cExtensionsC  = '*.3gp;*.avi;*.avs;*.divx;*.f4v;*.flv;*.m2ts;*.m4v;*.mkv;*.mp3;*.mp4;*.mpg;*.ogg;*.ogm;*.ts;*.vob'
$sFolderPath = 'V:\Movies\'

$hTimer1 = TimerInit()

_FileListToArrayXT( $sFolderPath , $cExtensionsC , 1 , 2 , False , '' , 1 )

$iDiff1 = TimerDiff( $hTimer1 ) 


$hTimer2 = TimerInit()

_FileListToArrayRec( $sFolderPath , $cExtensionsC , 0 , 1 , 0 , 2 )

$iDiff2 = TimerDiff( $hTimer2 ) 

MsgBox( 0 , '' , '_FileListToArrayXT:' & @LF & $iDiff1 & @LF & @LF & '_FileListToArrayRec:' & @LF & $iDiff2 )

Recursive Code:

#include <File.au3>
#include <_FileListToArrayXT.au3>

$cExtensionsC  = '*.3gp;*.avi;*.avs;*.divx;*.f4v;*.flv;*.m2ts;*.m4v;*.mkv;*.mp3;*.mp4;*.mpg;*.ogg;*.ogm;*.ts;*.vob'
$sFolderPath = 'Q:\TV Shows\'

$hTimer1 = TimerInit()

_FileListToArrayXT( $sFolderPath , $cExtensionsC , 1 , 2 , True , '' , 1 )

$iDiff1 = TimerDiff( $hTimer1 ) 


$hTimer2 = TimerInit()

_FileListToArrayRec( $sFolderPath , $cExtensionsC , 1 , 1 , 0 , 2 )

$iDiff2 = TimerDiff( $hTimer2 ) 

MsgBox( 0 , '' , '_FileListToArrayXT:' & @LF & $iDiff1 & @LF & @LF & '_FileListToArrayRec:' & @LF & $iDiff2 )
Posted

The numbers are negligible.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

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
  • Recently Browsing   0 members

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