Uniface Underground -> Undocumented.Features.Only. Go Home

interrupt

 
Name interrupt
Some interactions with the file-system
Synopsis interrupt(InterruptCode,ResultString)

Download an example plus some new INTERRUPTCODE, Interrupt.exp using Uniface 8.4, ask for a 7.2.6 version.

Use Allowed in form components (and in service and report components that are not self-contained).
Description The interrupt statement performs some actions under your file-system depending on the InterruptCode as show in the following table :
 
InterruptCode Description
0 Return file information
1 ?
2 Return the dirname of a file
3 ? (=2 ?)
4 ?
5 Return the current directory
6 Concat the name of file with de current directory
7 returns the parent directory of the specified directory
8 ?
9 ?
10 Return a list of files in the current directory depending on the wildcard mask.
11 Return a list of subdirectories in the current directory 
12 ?

Tested in 7.2.02, 7.2.03

Note: Refer to Proc Language Manual section 1.12.3 Lists of items for information about the structure of lists.

Return Value
InterruptCode ResultString Result description
0 FileName If the file exists :
 $result = <InformationFileList>
 $status = 0
If the file doesn't exists:
$status = -1
2 FileName $result contains the basename of the FileName (cut the dirname). Ex. if FileName is "/usr2/pepe.txt" $result contains "pepe.txt"
5 $result contains the name of the current directory
6 FileName $result contains the concat of previous $result with FileName as needed for your file-system. 
10 Mask $result contains a list of the files which matches with the Mask (The mask can be a path + wildcard Ex. "/usr2/*.txt")
$status contains the number of files in this list
NOTE: if you call interrupt(10) $result contains a list of all the files in the current directory and $status the count
11 Mask $result contains a list of the directories which matches with the Mask (The mask can be a path + wildcard Ex. "/usr2/dir*")
$status contains the number of directories in this list
NOTE: if you call interrupt(11) $result contains a list of all the subdirectories in the current directory and $status the count
989 ApplFocus See the examples below
989 Format See the examples below
989 UndoGold See the examples below

The InformationFileList is a associative list with the keys Path, DiskDir, Name, Type, Version, Attrib, RecSize and Filesize

Example file_name = "pepe.txt"
interrupt(0,file_name)
if ($status = -1)
   interrupt(5)
   message/error "File not found in directory %%$result"
else
   getitem/id fsize, $result, "Filesize"
   message "The file size of %%file_name is %%fsize"
endif
Updated on Oct-2005

interrupt (989), "APPLFOCUS"
interrupt (989), "FORMAT"
interrupt (989), "UNDOGOLD"

Variables
STRING MyVar, ButtonDef, PanelDef
endvariables

;======================================================
; $UNF undocumented code 2005
;======================================================

;======================================================
; Application will be brougt in the Windows foreground
;======================================================
interrupt (989),"APPLFOCUS"

;======================================================
; Introduced in U7204
; Works in U7205/ U7206/ U8.x U9.x
; Used in Uniface Debugger, so little hazard when using
;======================================================

;======================================================
; Strip GOLDcharachters from a string
; "AK" will result in "A;K"
;======================================================
$result = "AK"
interrupt (989),"UNDOGOLD"
MyVar = $result

;======================================================
; Introduced in U7204
; Works in U7205/ U7206/ U8.x U9.x
; Used in Uniface Debugger, so little hazard when using
;======================================================

;======================================================
; Adds %%^ after each
; "AKM" will result in "A%%^K%%^M"
;======================================================
$result = "AK"
interrupt (989),"FORMAT"
MyVar = $result

interrupt (989),"UNDOGOLD"
MyVar = $result

;======================================================
; Introduced in U7204
; Works in U7205/ U7206/ U8.x U9.x
; Used in Uniface Debugger, so little hazard when using
;======================================================

 

 

 


Copyright © 1999-2000  $UUU  All rights reserved.
Disclaimer. | Site Comments.