You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed that in your code, the type ARGNUM_TYPE is defined as UInt16. However, I found that UInt16 may pose limitations, especially when dealing with large data.
For example:
using Scanf
str =repeat("%d%f",401000)
Scanf.Format(str)
Therefore, I would like to suggest considering modifying the type ARGNUM_TYPE to UInt32. The UInt32 type offers a wider range of values, which could enhance the robustness of the code and improve its ability to handle large datasets effectively.
Thank you for considering my suggestion. I look forward to hearing from you.
The text was updated successfully, but these errors were encountered:
I tried the obvious change you are suggesting (const ARGNUM_TYPE = UInt32) and came to the conclusion, that this is not compatible with this implementation.
The size of the objects and types used internally is already prohibitively huge when the number of arguments approaches typemax(UInt16), so larger values simply make the implementation practically unusable.
I don't think it is worth the effort to reimplement the whole stuff for a extremely rare use case, the typical case being a few or maximally a few dozens of arguments to be used in one format.
BTW, in C or C++ implementations, there is an implicit limit of 127 or 255 due to the minimal requirement on the number of arguments of a function call, which have to be supported by conforming implementations of the language.
Scanf.jl/src/Scanf.jl
Line 8 in c929cea
I noticed that in your code, the type ARGNUM_TYPE is defined as UInt16. However, I found that UInt16 may pose limitations, especially when dealing with large data.
For example:
using Scanf
str =repeat("%d%f",401000)
Scanf.Format(str)
Therefore, I would like to suggest considering modifying the type ARGNUM_TYPE to UInt32. The UInt32 type offers a wider range of values, which could enhance the robustness of the code and improve its ability to handle large datasets effectively.
Thank you for considering my suggestion. I look forward to hearing from you.
The text was updated successfully, but these errors were encountered: