Guest User

Untitled

a guest
Oct 22nd, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.66 KB | None | 0 0
  1. Object oAdd is a Button
  2. Set Location to 61 218
  3. Set Label to "Add"
  4.  
  5. // fires when the button is clicked
  6. Procedure OnClick
  7. String sFirstName
  8. String sLastName
  9. String sName
  10. Integer iArrayCount
  11. Integer iLoop
  12. Boolean bCheck
  13. String sLetter
  14.  
  15. Move (True) to bCheck
  16.  
  17. Get Value of oFirstName to sFirstName
  18. Get Value of oLastName to sLastName
  19.  
  20. For iLoop from 1 to (Length(sFirstName))
  21. Move (Uppercase(mid(sFirstName,1,iloop))) to sLetter
  22. If not ((sLetter ge "A") and (sLetter le "Z")) Begin
  23. Move (False) to bCheck
  24. End
  25. Loop
  26.  
  27. For iLoop from 1 to (Length(sLastName))
  28. Move (Uppercase(mid(sLastName,1,iloop))) to sLetter
  29. If not ((sLetter ge "A") and (sLetter le "Z")) Begin
  30. Move (False) to bCheck
  31. End
  32. Loop
  33.  
  34. If (bCheck) Begin
  35.  
  36. Move (sFirstName + ", " + sLastName) to sName
  37.  
  38. //array stuff
  39. Get Item_Count of ostudentname to iArrayCount
  40. Set Value of ostudentname item iArrayCount to sName
  41. End
  42. Else Begin
  43. Send Info_Box "fail"
  44. End
  45.  
  46. Set Value of oFirstName to ""
  47. Set Value of oLastName to ""
  48. End_Procedure
  49.  
  50. End_Object
Add Comment
Please, Sign In to add comment