Oxygen Basic

Programming => Example Code => General => Topic started by: Charles Pegge on May 19, 2011, 07:07:45 AM

Title: Ascii Cases
Post by: Charles Pegge on May 19, 2011, 07:07:45 AM
This is a useful feature supported by C.

The first character or the quoted string is automatically converted to Ascii before the case is tested:

Code: [Select]

  '============
  'ASCII SELECT
  '============

  select asc "qwerty"

  case "a" to "p"

    print "a to p"

  case "q" to "z"

    print "q to z"

  case else

    print "not lower case"

  end select

Charles
Title: Re: Ascii Cases
Post by: kryton9 on May 19, 2011, 11:18:20 AM
Thanks for the latest Alpha 34, in reading the notes about it... I saw the case selection by ascii, nice touch-- that will be a handy one!
Title: Re: Ascii Cases
Post by: Charles Pegge on May 19, 2011, 10:16:38 PM

This will work for the lower wide characters as well . I dont think there will be much demand for using this feature on full unicode.

Charles