[fpc-devel] [Suggestion] Enumeration range-check intrinsic

J. Gareth Moreton gareth at moreton-family.com
Thu Jul 11 08:35:44 CEST 2019


Should I modify the patch to allow enumerations with holes with "is" and 
"as"?  Note that these operators will return True/not raise an error if 
a value falls within a hole but is otherwise between the lowest and 
highest elements.

Gareth aka. Kit

On 09/07/2019 20:19, J. Gareth Moreton wrote:
>
> Hopefully we'll get there in the end!  I've updated what I can in the 
> patch file directly, so hopefully all is well now.
>
> Some of the variable names, like "ProcName", were already named as such.
>
> Gareth aka. Kit
>
> On 09/07/2019 10:12, Sven Barth via fpc-devel wrote:
>> J. Gareth Moreton <gareth at moreton-family.com 
>> <mailto:gareth at moreton-family.com>> schrieb am Di., 9. Juli 2019, 08:20:
>>
>>     Apologies - I see now... I used them with "with" without even
>>     thinking
>>     about it!  I've made the changes as requested. Admittedly it's quite
>>     hard for me to remove spaces from either side of operators because
>>     that's something I learnt from my early days in Turbo Pascal and
>>     to not
>>     have spaces (and all types and variables being lowercase) feels very
>>     C-like.  But hey, rules are rules... or guidelines!
>>
>>
>> I know the feeling. But when in Rome...
>>
>>     Is the new AS-IS-enum-08 patch any better?
>>
>>
>> Better (though are still some " = " around :P ), but it seems you 
>> missed tasnode.pass_1?
>> Also the typenames (TOrdDef, TEnumDef) should be lowercase as well as 
>> the local variables.
>>
>> Regards,
>> Sven
>>
>>
>> _______________________________________________
>> fpc-devel maillist  -fpc-devel at lists.freepascal.org
>> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel
>
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
> 	Virus-free. www.avast.com 
> <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> 
>
>
> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> _______________________________________________
> fpc-devel maillist  -  fpc-devel at lists.freepascal.org
> https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190711/84cd75fa/attachment-0001.html>


More information about the fpc-devel mailing list