slang-users mailing list

[2022 Date Index] [2022 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] Version 2.3.3 of the slang library released


This was just one of the examples. All qualifiers making this expression something else than ULong_Type produce this error. If any negative expression of an unsigned type is throwing an error this is also fine, what bit me a couple of times is that

   slsh> -1u;

evaluates to ULong_Type, not UInt_Type as I would expect. Also, throwing an error on literal unsigned "negative" input seems inconsistent with

   slsh> typecast(-1, UShort_Type);

But that might also just be me and my notorious abuse of short notations.

Jakob

On 05.08.22 13:49, John E. Davis wrote:
Jakob Stierhof<jakob.stierhof@xxxxxx>  wrote:
thanks for the release, I will update our system next week and give it a
proper test. However, one think I was noticing and want to point out is
the behavior for unsigned literals. I have mentioned this a while back
and I still don't know what the best way is to solve this. The issue
remains so far:

    slsh> _slang_version_string;
     2.3.3
    slsh> -1uh;
     Literal integer constant is too large for UShort_Type

I thought I mention this again so it does not get lost.
Is the intent to produce SHORT_MAX?  If so, then why not use
SHORT_MAX?  Alternatively `typecast (-1, UShort_Type)' may be used. I
also realize the inconsistency that that -1uL does not produce this
error message.

Thanks,
--John

Regards,
Jakob
_______________________________________________
For list information, visit<http://jedsoft.org/slang/mailinglists.html>.

[2022 date index] [2022 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]