home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / E / TFF-A32R.LZX / AmigaE3.2a / RkrmSrc / Resources / Get_Disk_Unit_ID.e < prev    next >
Encoding:
Text File  |  1996-08-29  |  752 b   |  27 lines

  1. -> Get_Disk_Unit_ID.e - Example of getting the UnitID of a disk
  2.  
  3. OPT PREPROCESS
  4.  
  5. -> E-Note: E does not (as of v3.1a) support Resources in the conventional way
  6. MODULE 'other/disk',
  7.        'resources/disk'
  8.  
  9. PROC main()
  10.   DEF ids, type
  11.   IF NIL=(diskbase:=OpenResource(DISKNAME))
  12.     WriteF('Cannot open \s\n', DISKNAME)  -> E-Note: big typo in C version
  13.   ELSE
  14.     WriteF('Defined drive types are:\n')
  15.     WriteF('  AMIGA  $00000000\n')
  16.     WriteF('  5.25"  $55555555\n')
  17.     WriteF('  AMIGA  $00000000 (high density)\n')  -> Commodore-only product
  18.     WriteF('  None   $FFFFFFFF\n\n')
  19.  
  20.     -> What are the UnitIDs?
  21.     FOR ids:=0 TO 3
  22.       type:=getUnitID(ids)
  23.       WriteF('The UnitID for unit \d is $\z\h[8]\n', ids, type)
  24.     ENDFOR
  25.   ENDIF
  26. ENDPROC
  27.