home *** CD-ROM | disk | FTP | other *** search
/ Carsten's PPE Collection / Carstens_PPE_Collection_2007.zip / S / SVOTE300.ZIP / CHKVOTE.PPE (.txt) < prev    next >
PCBoard Programming Language Executable  |  1994-05-14  |  2KB  |  159 lines

  1. ;------------------------------------------------------------------------------
  2. ;                                                   .ss.
  3. ;                                                   `²²'
  4. ;             .,sS$Ss,,s$  .,sS$$$Ss.  .,sS$Ss,,s$ .ss.  .sSs.
  5. ;           .d$$²^°²$$$$'.d$P²°^^²$P'.d$$²^°²$$$$'.$$$' .$$$²Sb,.
  6. ;           $$$'   .$$$' $$$²Sçsµ²' .$$$'   .$$$'.$$$' .$$$'  `$$b.
  7. ;           $$$b,,d$$$' ,$$$b,....,s$$$$b,,d$$$'.$$$;.,$$$'    ;$$$
  8. ;           `²S$$S²²S$$S²°²S$$$$S²°°²S$$$$$$',$$S²°²S$S'.sS$$$P²'
  9. ;                                    .sS²°$$$²²°"'       d²°'
  10. ;                                  .$$²  .$$'
  11. ;                                  $$$.,d$$'
  12. ;                                  `²S$$S²'
  13. ;------------------------------------------------------------------------------
  14. ; P.P.L.X. 2.OO                          (C)1996 - Lone Runner / AEGiS CoRP'96 
  15. ;------------------------------------------------------------------------------
  16. ; PPE 2.OO (plain) - Analysis ON - Postprocessing ON
  17. ;------------------------------------------------------------------------------
  18.  
  19.     Boolean  BOOLEAN001
  20.     Integer  INTEGER001
  21.     Integer  INTEGER002
  22.     Integer  INTEGER003
  23.     Integer  INTEGER004
  24.     Integer  INTEGER005
  25.     Integer  INTEGER006
  26.     String   STRING001
  27.     String   STRING002
  28.     String   STRING003
  29.     String   STRING004
  30.     String   STRING005
  31.     String   STRING006
  32.     String   STRING007
  33.     String   STRING008
  34.     String   STRING009
  35.  
  36. ;------------------------------------------------------------------------------
  37.  
  38.     STRING005 = ReadLine(PPEPath() + "VOTE.CFG", 14)
  39.     If (Exist(STRING005 + "CHKTEXT" + LangExt()) == 0) Then
  40.         Color 12
  41.         PrintLn "Error: CHKTEXT.XXX is missing, please notify the Sysop."
  42.         End
  43.     Endif
  44.     FOpen 1, STRING005 + "CHKTEXT" + LangExt(), 2, 0
  45.     FGet 1, STRING006
  46.     FGet 1, STRING007
  47.     FGet 1, STRING008
  48.     FGet 1, STRING009
  49.     FClose 1
  50.     Print STRING006
  51.     STRING004 = ReadLine(PPEPath() + "VOTE.CFG", 13)
  52.     FOpen 1, STRING004 + "VOTE.LST", 2, 0
  53.     While (Ferr(1) == 0) Do
  54.         FGet 1, STRING001
  55.         If (Len(STRING001) == 0) Break
  56.         Inc INTEGER002
  57.         INTEGER006 = 0
  58.         BOOLEAN001 = 0
  59.         While (BOOLEAN001 == 0) Do
  60.             Inc INTEGER006
  61.             STRING002 = ReadLine(STRING004 + STRING001 + ".VSI", INTEGER006)
  62.             If (Len(STRING002) == 0) Break
  63.             If (Left(Upper(STRING002), Len(U_Name())) == U_Name()) Then
  64.                 Inc INTEGER001
  65.                 Break
  66.             Endif
  67.         EndWhile
  68.     EndWhile
  69.     FClose 1
  70.     For INTEGER004 = 1 To Len(StripAtx(STRING006))
  71.         Print Chr(8) + Chr(32) + Chr(8)
  72.     Next
  73.     If (INTEGER001 < INTEGER002) Then
  74.         INTEGER003 = INTEGER002 - INTEGER001
  75.         While (InStr(STRING007, "@NUMVOTE@") <> 0) Do
  76.             INTEGER005 = InStr(STRING007, "@NUMVOTE@") - 1
  77.             STRING007 = String(Left(STRING007, INTEGER005) + String(INTEGER003) + Right(STRING007, Len(STRING007) - INTEGER005 - 9))
  78.         EndWhile
  79.         PrintLn STRING007
  80.         Newline
  81.         STRING003 = "N"
  82.         InputStr STRING008, STRING003, 7, 1, "YyNn", 64 + 2 + 4 + 8
  83.         If (STRING003 == "Y") Then
  84.             Call PPEPath() + "VOTE.PPE"
  85.             PrintLn STRING009
  86.         Endif
  87.     Endif
  88.  
  89. ;------------------------------------------------------------------------------
  90. ;
  91. ; Usage report (before postprocessing)
  92. ;
  93. ; ■ Statements used :
  94. ;
  95. ;    1       End
  96. ;    1       Color 
  97. ;    15      Goto 
  98. ;    11      Let 
  99. ;    2       Print 
  100. ;    3       PrintLn 
  101. ;    10      If 
  102. ;    2       FOpen 
  103. ;    2       FClose 
  104. ;    5       FGet 
  105. ;    1       InputStr 
  106. ;    3       Inc 
  107. ;    1       Newline
  108. ;    1       Call 
  109. ;
  110. ;
  111. ; ■ Functions used :
  112. ;
  113. ;    18      +
  114. ;    4       -
  115. ;    7       ==
  116. ;    1       <>
  117. ;    2       <
  118. ;    1       <=
  119. ;    2       >=
  120. ;    8       !
  121. ;    2       &&
  122. ;    1       ||
  123. ;    6       Len(
  124. ;    1       Upper()
  125. ;    2       Left()
  126. ;    1       Right()
  127. ;    1       Ferr()
  128. ;    3       Chr()
  129. ;    2       InStr()
  130. ;    2       U_Name()
  131. ;    2       StripAtx()
  132. ;    2       String()
  133. ;    3       PPEPath()
  134. ;    3       ReadLine()
  135. ;    1       Exist()
  136. ;    2       LangExt()
  137. ;
  138. ;------------------------------------------------------------------------------
  139. ;
  140. ; Analysis flags : C
  141. ;
  142. ; C - Call child PPE ■ 3
  143. ;     This is usually normal, but may be a tricky way to launch some
  144. ;     sysop-only commands.
  145. ;     ■ Search for : CALL
  146. ;
  147. ;------------------------------------------------------------------------------
  148. ;
  149. ; Postprocessing report
  150. ;
  151. ;    1       For/Next
  152. ;    3       While/EndWhile
  153. ;    4       If/Then or If/Then/Else
  154. ;    0       Select Case
  155. ;
  156. ;------------------------------------------------------------------------------
  157. ;                 AEGiS Corp - Break the routines, code against the machines!
  158. ;------------------------------------------------------------------------------
  159.