Jump to content

AutoIt v3.3.16.0 - Doubles greater then of Len 10 break SRandom()


Recommended Posts

 

Local $nDoubleNo1 = Number("50853881441621333029", 3)
Local $nDoubleNo2 = Number("93541875452114878455", 3)
Local $nDoubleNo3 = Number("1234567890", 3)

ConsoleWrite("DoubleNo1 (Type:" & VarGetType($nDoubleNo1) & ") is: " & $nDoubleNo1 & @CRLF)
ConsoleWrite("DoubleNo2 (Type:" & VarGetType($nDoubleNo2) & ") is: " & $nDoubleNo2 & @CRLF)
ConsoleWrite("DoubleNo3 (Type:" & VarGetType($nDoubleNo3) & ") is: " & $nDoubleNo3 & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo1 into SRandom" & @CRLF)
SRandom($nDoubleNo1)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo2 into SRandom" & @CRLF)
SRandom($nDoubleNo2)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo3 into SRandom" & @CRLF)
SRandom($nDoubleNo3)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

; what

The first two doubles, even so they are entirely different, when feed into SRandom() create the same Random() results, when they actually should create different results. This seems to happen always once the Double is greater then of Len 10. Which is why the third double then returns a different result. So no matter what the number is, once its longer then 9, SRandom() seems to break. So if one would now add one additional number to No3 then the result would also be the same.

DoubleNo1 (Type:Double) is: 5.08538814416213e+19
DoubleNo2 (Type:Double) is: 9.35418754521149e+19
DoubleNo3 (Type:Double) is: 1234567890

Feeding DoubleNo1 into SRandom
First Random: 993
Second Random: 958

Feeding DoubleNo2 into SRandom
First Random: 993
Second Random: 958

Feeding DoubleNo3 into SRandom
First Random: 849
Second Random: 975

A UDF of mine depends on SRandom with bigger nummers, which is why i noticed this.

Link to comment
Share on other sites

If you'd had taken the pain to just look at the help on SRandom, you'd have discovered that:

Quote

Seed value for random number generation. Number between -2^31 and 2^31-1

O, surprise!

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)

Link to comment
Share on other sites

The hint in the help is there: -2^31 and 2^31-1
That's exactly the range of a signed 32-bit integer.

If you follow the clue, you'd use integers instead of doubles, and, ô surprise #2:

Local $nDoubleNo1 = 64654645644
Local $nDoubleNo2 = 84253454868
Local $nDoubleNo3 = 12345678903

ConsoleWrite("DoubleNo1 (Type:" & VarGetType($nDoubleNo1) & ") is: " & $nDoubleNo1 & @CRLF)
ConsoleWrite("DoubleNo2 (Type:" & VarGetType($nDoubleNo2) & ") is: " & $nDoubleNo2 & @CRLF)
ConsoleWrite("DoubleNo3 (Type:" & VarGetType($nDoubleNo3) & ") is: " & $nDoubleNo3 & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo1 into SRandom" & @CRLF)
SRandom($nDoubleNo1)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo2 into SRandom" & @CRLF)
SRandom($nDoubleNo2)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo3 into SRandom" & @CRLF)
SRandom($nDoubleNo3)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

 

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)

Link to comment
Share on other sites

1 minute ago, jchd said:

The hint in the help is there: -2^31 and 2^31-1
That's exactly the range of a signed 32-bit integer.

If you follow the clue, you'd use integers instead of doubles, and, ô surprise #2:

Local $nDoubleNo1 = 64654645644
Local $nDoubleNo2 = 84253454868
Local $nDoubleNo3 = 12345678903

ConsoleWrite("DoubleNo1 (Type:" & VarGetType($nDoubleNo1) & ") is: " & $nDoubleNo1 & @CRLF)
ConsoleWrite("DoubleNo2 (Type:" & VarGetType($nDoubleNo2) & ") is: " & $nDoubleNo2 & @CRLF)
ConsoleWrite("DoubleNo3 (Type:" & VarGetType($nDoubleNo3) & ") is: " & $nDoubleNo3 & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo1 into SRandom" & @CRLF)
SRandom($nDoubleNo1)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo2 into SRandom" & @CRLF)
SRandom($nDoubleNo2)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding DoubleNo3 into SRandom" & @CRLF)
SRandom($nDoubleNo3)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

 

As said, it did work in the previous autoit stable

Link to comment
Share on other sites

And what do you think is failing?

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)

Link to comment
Share on other sites

Maybe previous releases were more permissive than the latest (today's) one, but if you violate the specification expect undefined behavior: it may work or not because this isn't part of the contract.

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)

Link to comment
Share on other sites

Just now, jchd said:

Maybe previous releases were more permissive than the latest (today's) one, but if you violate the specification expect undefined behavior: it may work or not because this isn't part of the contract.

Thanks anyway, i switch to Integers

Link to comment
Share on other sites

I confess that it would be beneficial to have 64-bit integers or even doubles supported but for that we currently have to rely on external feature, like the latest Crypt* functions.

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)

Link to comment
Share on other sites

21 minutes ago, jchd said:

Maybe previous releases were more permissive than the latest (today's) one, but if you violate the specification expect undefined behavior: it may work or not because this isn't part of the contract.

You mean it used to work as it did (not quite right) and now (in Au3.3.3.16.0) it has been improved or even fixed?

Something like a decade ago fix for adding Null support?

As a side note:
The addition of Null support hit a few of my projects because ADO started returning Null instead of 0 (or something like this ... I do not remember exactly)
 

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:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

It seems it has been just made compliant with the specification, which it wasn't quite in previous releases.

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)

Link to comment
Share on other sites

4 minutes ago, jchd said:

It seems it has been just made compliant with the specification, which it wasn't quite in previous releases.

Is it this:

https://www.autoitscript.com/trac/autoit/ticket/3760

?

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:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Maybe. I remember having posted at least two trac tickets about large ints but I don't know what change in code their fix did cause, nor their consequences.

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)

Link to comment
Share on other sites

4 hours ago, jchd said:

I confess that it would be beneficial to have 64-bit integers or even doubles supported but for that we currently have to rely on external feature, like the latest Crypt* functions.

So doubles no longer work like before, but Int64 do now. I think this was also different before

Local $nNo1 = 6465464564422266666
Local $nNo2 = 9223372036854775807 ; max
Local $nNo3 = 4565615152178932588

ConsoleWrite("No1 (Type:" & VarGetType($nNo1) & ") is: " & $nNo1 & @CRLF)
ConsoleWrite("No2 (Type:" & VarGetType($nNo2) & ") is: " & $nNo2 & @CRLF)
ConsoleWrite("No3 (Type:" & VarGetType($nNo3) & ") is: " & $nNo3 & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding No1 into SRandom" & @CRLF)
SRandom($nNo1)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding No2 into SRandom" & @CRLF)
SRandom($nNo2)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

ConsoleWrite(@CRLF)

ConsoleWrite("Feeding No3 into SRandom" & @CRLF)
SRandom($nNo3)

ConsoleWrite("First Random: " & Random(100, 999, 1) & @CRLF)
ConsoleWrite("Second Random: " & Random(100, 999, 1) & @CRLF)

 

No1 (Type:Int64) is: 6465464564422266666
No2 (Type:Int64) is: 9223372036854775807
No3 (Type:Int64) is: 4565615152178932588

Feeding No1 into SRandom
First Random: 342
Second Random: 407

Feeding No2 into SRandom
First Random: 185
Second Random: 889

Feeding No3 into SRandom
First Random: 844
Second Random: 833

 

Link to comment
Share on other sites

<rant>

Legacy !.
There are thing that, to me, are more practical as UDF than internal. 
_Crypt_GenRandom() works and if not happy with it it can be changed by the community unlike the internal function that takes issuing a new version of AutoIt. Same with @OSVersion, if it was a UDF it'd be easier/faster to attend to than depending on the internal one that again, requires a recompile of AutoIt and a new version that may otherwise not be needed, if just for that internal function.

</rant>

Follow the link to my code contribution ( and other things too ).
FAQ - Please Read Before Posting.
autoit_scripter_blue_userbar.png

Link to comment
Share on other sites

  • Developers

Nobody is stopping you/others from adding useful UDFs to the standard library. Happened before that a udf was added, similar to an internal function, with extended functionality. 😉 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 1 month later...

You mean it used to operate as it did (not quite properly) and now it has been enhanced or even corrected (in Au3.3.3.16.0)?

Is there a remedy for adding Null support from a decade ago?

ADO started returning Null instead of 0 when Null support was added, which impacted a handful of my projects (or something like this ... I do not remember exactly)

Link to comment
Share on other sites

3 hours ago, jessicaagu said:

Is there a remedy for adding Null support from a decade ago?

ADO started returning Null instead of 0 when Null support was added, which impacted a handful of my projects (or something like this ... I do not remember exactly)

Why do you want to broke things that was fixed?

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:

Spoiler

Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind. 

My contribution (my own projects): * Debenu Quick PDF Library - UDF * Debenu PDF Viewer SDK - UDF * Acrobat Reader - ActiveX Viewer * UDF for PDFCreator v1.x.x * XZip - UDF * AppCompatFlags UDF * CrowdinAPI UDF * _WinMergeCompare2Files() * _JavaExceptionAdd() * _IsBeta() * Writing DPI Awareness App - workaround * _AutoIt_RequiredVersion() * Chilkatsoft.au3 UDF * TeamViewer.au3 UDF * JavaManagement UDF * VIES over SOAP * WinSCP UDF * GHAPI UDF - modest begining - comunication with GitHub REST APIErrorLog.au3 UDF - A logging Library * Include Dependency Tree (Tool for analyzing script relations) * Show_Macro_Values.au3 *

 

My contribution to others projects or UDF based on  others projects: * _sql.au3 UDF  * POP3.au3 UDF *  RTF Printer - UDF * XML.au3 UDF * ADO.au3 UDF SMTP Mailer UDF * Dual Monitor resolution detection * * 2GUI on Dual Monitor System * _SciLexer.au3 UDF * SciTE - Lexer for console pane

Useful links: * Forum Rules * Forum etiquette *  Forum Information and FAQs * How to post code on the forum * AutoIt Online Documentation * AutoIt Online Beta Documentation * SciTE4AutoIt3 getting started * Convert text blocks to AutoIt code * Games made in Autoit * Programming related sites * Polish AutoIt Tutorial * DllCall Code Generator * 

Wiki: Expand your knowledge - AutoIt Wiki * Collection of User Defined Functions * How to use HelpFile * Good coding practices in AutoIt * 

OpenOffice/LibreOffice/XLS Related: WriterDemo.au3 * XLS/MDB from scratch with ADOX

IE Related:  * How to use IE.au3  UDF with  AutoIt v3.3.14.x * Why isn't Autoit able to click a Javascript Dialog? * Clicking javascript button with no ID * IE document >> save as MHT file * IETab Switcher (by LarsJ ) * HTML Entities * _IEquerySelectorAll() (by uncommon) * IE in TaskSchedulerIE Embedded Control Versioning (use IE9+ and HTML5 in a GUI) * PDF Related:How to get reference to PDF object embeded in IE * IE on Windows 11

I encourage you to read: * Global Vars * Best Coding Practices * Please explain code used in Help file for several File functions * OOP-like approach in AutoIt * UDF-Spec Questions *  EXAMPLE: How To Catch ConsoleWrite() output to a file or to CMD *

I also encourage you to check awesome @trancexx code:  * Create COM objects from modules without any demand on user to register anything. * Another COM object registering stuffOnHungApp handlerAvoid "AutoIt Error" message box in unknown errors  * HTML editor

winhttp.au3 related : * https://www.autoitscript.com/forum/topic/206771-winhttpau3-download-problem-youre-speaking-plain-http-to-an-ssl-enabled-server-port/

"Homo sum; humani nil a me alienum puto" - Publius Terentius Afer
"Program are meant to be read by humans and only incidentally for computers and execute" - Donald Knuth, "The Art of Computer Programming"
:naughty:  :ranting:, be  :) and       \\//_.

Anticipating Errors :  "Any program that accepts data from a user must include code to validate that data before sending it to the data store. You cannot rely on the data store, ...., or even your programming language to notify you of problems. You must check every byte entered by your users, making sure that data is the correct type for its field and that required fields are not empty."

Signature last update: 2023-04-24

Link to comment
Share on other sites

Back to your first pb.

You cannot expect that  the your number which is converted to an integer be not between ( 2^63 2^63 -1) as SRandom need to have an integer as argument

if you use $nDoubleNo1 = 9223372036854775807 and $nDoubleNo2 = 9223372036854775806 everything is OK

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