Hello,
I would like to call different code, depending on the version of the nim compiler used. Some code uses the deprecated version of readChars found here. Converting it to the new overload works for Nim >= 1.6.0, but not for 1.4.x as they do not have that one. Now I would like to call the new version on Nim >= 1.6.0 and otherwise the old one.
A possible solution could look like this (assuming there were global constants nimMajorVersion and nimMinorVersion :
when (nimMajorVersion == 1 and nimMinorVersion >= 6):
<use the new overload for readChars here>
else:
<use the old version here>
Is there some way in Nim to do this?