From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,874f90f0816ffe3b X-Google-Attributes: gid103376,public From: stt@houdini.camb.inmet.com (Tucker Taft) Subject: Re: Most efficient way to check for null string? Date: 1997/06/23 Message-ID: #1/1 X-Deja-AN: 252102734 Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.camb.inmet.com References: Organization: Intermetrics, Inc. Newsgroups: comp.lang.ada Date: 1997-06-23T00:00:00+00:00 List-Id: Robert Dewar (dewar@merv.cs.nyu.edu) wrote: : Robert Duff says : | Tucker Taft wrote: : | >...If you really want to : | >shave cycles, the following will likely be the most efficient: : | > : | > if Str'Last < Str'First then ... : | Bletch. That's the least readable of all, but Tucker's right that it : | might be more efficient. ... : Tuck's suggestion is an excellent example of what programmers should NOT do. I guess I forgot the smiley ;-). Please don't write "if Str'Last < Str'First then ..." in your code, but of course if you must, name it after me... (insert smiley here). -Tucker Taft stt@inmet.com http://www.inmet.com/~stt/ Intermetrics, Inc. Burlington, MA USA