home *** CD-ROM | disk | FTP | other *** search
/ Chip 1997 February / Image.iso / bench / staroff / subexmpl.0 / SUBEXMPL.SDW (.txt)
Encoding:
StarWriter Document  |  1996-02-06  |  8.5 KB  |  87 lines

  1. SW3HDR
  2. (EMG158AI(SV304A)]D
  3. Address!R
  4. Frameformat
  5. Zeichenformat
  6. Textformatvorlage
  7. Standard
  8. HP LaserJet 4V
  9. HP LaserJet 4V
  10. \\Home\qs_lj4v
  11. HPPCL5MS
  12. HP LaserJet 4V
  13. MSUDN
  14. HP LaserJet 4V
  15. SW3HDR
  16. Frameformat
  17. Zeichenformat
  18. Textformatvorlage
  19. Standard
  20. , 6'"
  21. Standard
  22. Standard
  23. 2,max,1702;1702;100;0;0;13875;8070;0
  24. Standard
  25. LIBIMBEDDED
  26. LIBIMBEDDED
  27. Kay Koll
  28. Kay Koll
  29. subexmpl
  30. SfxDocumentInfo
  31. Kay Koll                       
  32. Kay Koll                       
  33.                                
  34. subexmpl                                                       
  35.                                                                
  36.                                                                                                                                                                                                                                                                
  37.                                                                                                                                
  38. Info 0             
  39.                    
  40. Info 1             
  41.                    
  42. Info 2             
  43.                    
  44. Info 3             
  45.                    
  46. StarWriter 3.0
  47. StarWriter 3.0
  48. swriter3.StarWriterDocument.3
  49. SBX sb
  50. Standard
  51. StarBASIC
  52. SBX AR
  53. SBX AR
  54. SBX AR
  55. SBX bm
  56. Modul1
  57. StarBASICModule
  58. SBX AR
  59. SBX em
  60. Start
  61. SBX em
  62. WordCount
  63. WortText
  64. SBX AR
  65. SBX AR
  66. Modul1SC
  67. option explicit
  68. Sub Start
  69.     dim text$
  70.     text$ = inputbox("Bitte geben Sie einen Text ein", "Eingabeaufforderung")
  71.     print "Dies Text enth
  72. lt";WordCount%(Text$);" Worte"
  73. End Sub
  74. '*** Funktion z
  75. hlt Leerzeichen in einem String, und
  76. '*** damit die Worte.
  77. function WordCount%(WortText$)
  78.     dim z%, count%
  79.     count%=1
  80.     for z%=1 to len(WortText$)
  81.         if mid$(WortText$,z%,1)=" " then
  82.             count%=count%+1
  83.         endif
  84.     next z%
  85.     WordCount%=count%+1        '+1, weil ein Leerzeichen=zwei Worte
  86. end function
  87.