Programma di esempio UUENCODE.PRT
; UUENCODE
;
; Programma per Proteus
;
; (C) 1998-2003 Simone Zanella Productions
;
; Questo programma scrive sull'uscita una versione UUENCODED del primo
; file specificato.

IF ISEMPTY(ARGV(5))
  CONSOLELN "Sintassi: " ARGV(1) " " ARGV(2) \
            " .. destinazione [nomefile]"
  CONSOLELN ""
  CONSOLELN "Scopo: scrive su destinazione una versione " \
            "UUENCODED di nomefile"
  ABORT 0
FI
SET H = FOPEN(ARGV(5), 1)
IF EQ(H, -1)
  CONSOLELN "File \"" ARGV(5) "\" non trovato."
  ABORT 1
FI
PRINTLN "begin " Attribs(ARGV(5)) " \"" QualifyName(ARGV(5)) "\""
WHILE NOT(FEOF(H))
  SET S = FREAD(H, 45)
  IF STRLEN(S)
    PRINTLN UUENCODE(S)
  FI
LOOP
PRINTLN "`"
PRINTLN "end"
ABORT 0


FUNCTION QualifyName(s)

!ifdef UNIX
  SET p = STRRSTR(s, "/")
!else
  SET p = STRRSTR(s, "\\")
!endif
IF p
  SET s = RESTFROM(s, INC(p))
FI
RETURN s

FUNCTION Attribs(s)

!ifndef UNIX
  RETURN "644"
!else
  SET fa = FATTRIB(s)
  RETURN NAND(fa, 7) NAND(SHIFTRT(fa, 5), 7) \
         NAND(SHIFTRT(fa, 8), 7)
!endif
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