Re: Function like "in" in Delphi?



In article <1162049614.155063.133380@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
nc@xxxxxxxxx says...


You can do:

if (in_array($somechar, array("a", "b", "d")))

or

if (strpos(' abd', $somechar) > 0)

Cheers,
NC



Still overly complex by comparison I think.

In Delphi:

if "x" in ['a'..'z']

quicker to type - prettier on the eye - no question about case
sensitivity needed, easier to understand on first glance ?
.



Relevant Pages

  • Re: Delphi getting back to its roots
    ... > One area that MS is ignoring native compiled development tools. ... I would love to see more, quicker, sooner work done on native 64bit and more improvements to 32bit. ... If Borland had put things in motion to come out with a 64-bit compiler NOW, we would be eating MS' lunch with 64-bit lean, mean, robust, rock-solid executables with minimal intallation/maintenance requirements. ... We have Delphi, MS doesn't. ...
    (borland.public.delphi.non-technical)
  • Re: first impression and uneasy feeling... (long)
    ... I failed to see how I could justify the cost of Delphi 8. ... > - VCL.NET makes migration of app easier ... > - Easier deployment of apps ... > quicker as WebForms and .NET has many more advantages over the ...
    (borland.public.delphi.non-technical)
  • Re: Delphi getting back to its roots
    ... Thomas Miller schrieb: ... love to see more, quicker, sooner work done on native 64bit and more improvements to 32bit. ... I guess what I am suggesting is to push back support for Avalon .Net for more native work. ... Those are the areas where Delphi is hard to beat. ...
    (borland.public.delphi.non-technical)
  • Re: Delphi getting back to its roots
    ... would love to see more, quicker, sooner work done on native 64bit and more ... If Borland had put things in motion to come out with a 64-bit ... We have Delphi, MS doesn't. ...
    (borland.public.delphi.non-technical)
  • Re: VB6, VB2005, or Something Else?
    ... I wonder if RealBasic is more like VB than Delphi, ... Personally the one I am keeping my eye on is freebasic. ... And it been real solid from what tests I could run. ... Although I would lose a lot from not having the VB6 IDE it would mean ...
    (microsoft.public.vb.general.discussion)