Hi All,

With this code below i am getting spaces on the Line 2, 3, 4 before the (#) 
sign because and dont know how to remove them. This is
basically for randomly generating the order of the field. I am removing 
QUOTEs from the string.

#3 A sterile barrier that has been permeated must be considered unsterile.
#1 All items within a sterile field should be sterile.
#2 The edges of a sterile container are not considered sterile once the 
container is opened.
#7 Movements within or around a sterile field must be such as not to cause 
contamination of the sterile field.


global gtheList
on shuffle gtheList
  -- randomises the order of elements in a list
  repeat with pos = 1 to count( gtheList )
    -- swap this element with a random one
    set temp = getAt(gtheList, pos )
    set swappos = random( count( gtheList ) )
    setAt gtheList, pos, getAt( gtheList, swappos )
    setAt gtheList, swappos, temp
  end repeat
  put gtheList into field "answer_check"
  set theString = the text of field   "answer_check"
  set theList = value(theString)
  set theString = string(theList)
  set howMany = the number of chars in theString

  repeat with i = howMany down to 1
    case char i of theString of
      ",":  put RETURN into char i of theString
      RETURN, QUOTE,  "[", "]" :delete char i of theString
    end case
  end repeat
  put theString into field "answer_field"
end


regards

ravi

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to