Programma di esempio CHECK.PRT
; CHECK
;
; Programma per Proteus
;
; (C) 2003 Simone Zanella Productions
;
; Verifica che il file specificato non contenga caratteri al di fuori del range ASCII 32-126, 13, 10.

#!proteus -z

IF STREQ(ARGV(5), "")
  CONSOLELN "Sintassi: " ARGV(1) " " ARGV(2) " sorgente"
  CONSOLELN ""
  CONSOLELN "Scopo: verifica che il file non contenga caratteri al di fuori dell'intervallo"
  CONSOLELN "32-126 + CR/LF"  
  ABORT 0
FI
Admitted = CHR(13) CHR(10)
FOR X = 32 TO 126
  Admitted = Admitted CHR(X)
NEXT
  
H = FOPEN(ARGV(5), 1)
IF EQ(H, -1)
  CONSOLELN "File non trovato: " ARGV(5)
FI
N = 0
Primo = 0
WHILE NOT(FEOF(H))
  L = FREAD(H, 512)
  P = STRCPBRK(L, Admitted)
  N2 = N
  Rest = L  
  WHILE NEQ(P, 0)
    IF NOT(Primo)
      CONSOLELN "Offset caratteri non ammessi:"
      Primo = 1
    FI
    CONSOLELN PFORMAT("06X", ADD(@N2, DEC(P))) " chr(" ASC(SUBSTR(Rest, P, 1)) ")"
    Rest = RESTFROM(Rest, INC(P))
    P = STRCPBRK(Rest, Admitted)
  LOOP  
  ADD(@N, STRLEN(L))  
LOOP
FCLOSE(H)
IF NOT(Primo)
  CONSOLELN "Nessun carattere non ammesso."
FI

ABORT 0
Indice esempi Prossimo esempio Esempio precedente Indice per argomenti Indice analitico
Midnight Lake iPhone Case Black Women Shoes Black Flat Shoes Leather Flats Black Patent Ballerinas Black Ballet Shoes Casual Shoes Black Shoes Women Balle Record Player Cufflinks Best iPhone XR Clear Cases iPhone XS/XS Max Leather Cases Sale Best iPhone 8/8 Plus Silicone Cases iPhone 7/7 Plus Cases & Screen Protector New Cases For iPhone 6/6 Plus iPhone 8 Case Sale iPhone Xr Case Online iPhone 7 Case UK Online iPhone X Case UK Sale iPhone X Case Deals iPhone Xs Case New Case For iPhone Xr UK Online Case For iPhone 8 UK Outlet Fashion Silver Cufflinks For Men Best Mens Cufflinks Outlet Online The Gold Cufflinks Shop Online Cheap Shirt Cufflinks On Sale Nice Wedding Cufflinks UK Online Top Black Cufflinks UK Online Mens Cufflinks Online Silver Cufflinks For Men Men Cufflinks UK Sale Gold Cufflinks UK Online Gold Cufflinks UK Silver Cufflinks UK Shirt Cufflinks Discount Online Mens Cufflinks Deals & Sales Girls Shoes For Dance Fashion Ballet Dance Shoes Best Ballet Flats Shoes UK Online Cheap Ballet Pointe Shoes UK Online Best Ballet Shoes Outlet Best Dance Shoes Sale Cheap Ballet Flats Sale UK Best Pointe Shoes Online UK Ballet Dance Shoes UK Shoes For Dance UK Best Ballet Slippers Shop Best Yoga Shoes Hotsell