Could someone please provide some input as to why my script does not convert
all lowercase letters to uppercase? It seems to stop after the first
conversion (which incidentally is to the wrong letter).

>> do %upcase-string.r
do %upcase-string.r
Script: "Upcase string" (11-Oct-1999)
Please enter a string to upcased: aaaAAA
aaaAAA
== #"A"
>> string
string
== "GaaAAA"
>>


REBOL [
    Title:  "Upcase string"
    Date:   11-Oct-99
    Author: "T.M. Brannon"
    Email:  [EMAIL PROTECTED]
    File:   %upcase-string.r
    Purpose:    {
        Convert a string to upper case.
    }
    Category: [file script utility]
]


string: ask "Please enter a string to upcased: "
posctr: 0
upcase-string:  foreach character string [
 posctr: posctr + 1
 either character > 91
  [ change string character - 26 ]
   [ character ]
]

Reply via email to