realbasic-nug
[Top] [All Lists]

Re: Select Case and case-sensitive strings?

To: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Subject: Re: Select Case and case-sensitive strings?
From: Norman Palardy <npalardy@great-white-software.com>
Date: Thu, 31 Jul 2008 13:49:14 -0600
Authentication-results: mx.google.com; spf=neutral (google.com: 74.124.194.228 is neither permitted nor denied by best guess record for domain of realbasic-nug-bounces@lists.realsoftware.com) smtp.mail=realbasic-nug-bounces@lists.realsoftware.com
Delivered-to: listarchive@realsoftware.com
In-reply-to: <33EF913F-876B-4E1F-A190-AC27DF8EC258@tolisgroup.com>
References: <33EF913F-876B-4E1F-A190-AC27DF8EC258@tolisgroup.com>
Reply-to: REALbasic NUG <realbasic-nug@lists.realsoftware.com>
Sender: realbasic-nug-bounces@lists.realsoftware.com

On 31-Jul-08, at 1:15 PM, Tim Jones wrote:

Hi Folks,

Is Select Case support to ignore case with comparing strings? I'm trying to process args() and I'm duplicating an existing Unix tools that's unavailable on OS X and the source is long ago lost. However, the original app had different meanings for different case - i.e.: -s meant one thing while -S meant something else.

Did my nice clean Select Case just become a huge nested If - ElseIf -End If block using StrComp in binary mode?


well .. string comparisons aren't case sensitive unless you use strcomp

Try

   select case true

      case strcomp(...)  = 0

   end select

the other was is to use ASC instead of a string but that's not very friendly either

   select case asc(optChar)

       case asc("a")

       case asc("A")

   end select


or a pile of "if strcomp .... "


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>