home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS - Coast to Coast
/
simteldosarchivecoasttocoast2.iso
/
fortran
/
fv121s.zip
/
FAT4.DOC
< prev
next >
Wrap
Text File
|
1988-06-08
|
16KB
|
449 lines
MAY 1988 FAT-VIDEO 1.21 CLRSTR Page V-55
CLRSTR(STRING,LEN)
Clear a string by filling with blanks, the space character.
character*132 string1
character*1 string2(132)
integer*2 len
len=132
call clrstr(string1,len)
call clrstr(string2,len)
inputs: string,len
returns: string
Description:
This function fills each byte in the string with the space
character, up to the length specified.
REMNUL(STRING)
This routine remove the null character( char(0)) an the
'`' character, and replaces them with a space character.
character*20 string
call remnul(string)
Description:
This function is used to remove the null character in null
terminated strings, to allow Fortran functions to use the string
data.
MAY 1988 FAT-VIDEO 1.21 CGETS Page V-56
CGETS(STRING,MAXLEN,IERR)
Get a string from the keyboard, echo it to the screen, and return
its length and error status. The returned string is null terminated.
integer*2 maxlen,ierr
character string*40
maxlen=40
call cgets(string,maxlen,ierr)
if(ierr.eq.-1)return
Description:
This routine gets an ascii string from the user. It can be no
longer than maxlen, and the actual length typed is returned in
maxlen. Ierr is returned as zero if all went well. If the user
types the ESC key during string input the string is cleared and
the function returns ierr=-1 . This allows a clean cancel
of the read function. The string characters are echoed as they
are typed, but with normal video attributes. This function uses
the BIOS keyboard functions, and cannot be interrupted by the
Ctrl-C or Ctrl-Break keypresses. This function clears the string
prior to accepting any input.
INPUTS:
Maxlen = Maximum number of characters to accept from user.
OUTPUTS:
STRING = String typed in by the user.
Maxlen = Actual number of characters typed by the user.
Ierr = 0 safe return, -1 the ESC key was pressed.
Copyright (c) 1987,1988 Marc A Norton All Rights Reserved.
MAY 1988 FAT-VIDEO 1.21 CGETAS Page V-58
CGETAS(ATTR,STRING,MAXLEN,IERR)
Get a string from the keyboard, echo it to the screen using the
attribute specified, and return its length and error status. The
returned string is null terminated.
integer*2 attr,maxlen,ierr
character string*40
maxlen=40
call cgetas(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Description:
This routine gets an ascii string from the user. It can be no
longer than maxlen, and the actual length typed is returned in
maxlen. Ierr is returned as zero if all went well. If the user
types the ESC key during string input the string is cleared and
the function returns ierr=-1 . This allows a clean cancel
of the read function. The string characters are echoed as they
are typed, but with the video attribute given. This function uses
the BIOS keyboard functions, and cannot be interrupted by the
Ctrl-C or Ctrl-Break keypresses. This function clears the string
prior to accepting any input.
INPUTS:
ATTR = Attribute to use in echoing the string to the screen.
Maxlen = Maximum number of characters to accept from user.
OUTPUTS:
STRING = String typed in by the user.
Maxlen = Actual number of characters typed by the user.
Ierr = 0 safe return, -1 the ESC key was pressed.
Copyright (c) 1987,1988 Marc A Norton All Rights Reserved.
MAY 1988 FAT-VIDEO 1.21 CGETIS Page V-58
CGETIS(ATTR,STRING,MAXLEN,IERR)
Get a string from the keyboard, echo it to the screen, and return
its length and error status. This routine only accepts integers and
the - sign.
integer*2 attr,maxlen,ierr
character string*20
maxlen=20
call cgetis(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Description:
This routine gets an integer string from the user. It can be no
longer than maxlen, and the actual length typed is returned in
maxlen. Ierr is returned as zero if all went well. If the user
types the ESC key during string input the string is cleared and
the function returns ierr=-1 . This allows a clean cancel
of the read function. The string characters are echoed as they
are typed, but with normal video attributes. This function uses
the BIOS keyboard functions, and cannot be interrupted by the
Ctrl-C or Ctrl-Break keypresses. Only integers and the - sign
are accepted by this routine. This routine clears the string prior
to accepting any input.
The returned string is not null terminated and may be read into
an integer variable as follows:
real*8 R1
integer*2 I1
character*20 string
maxlen=20
call cput(' Enter a number: `')
call cgetis(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Read(unit=string,fmt='(g20.0)')R1
I1 = R1
INPUTS:
ATTR = Attribute to use in echoing the string to the screen.
Maxlen = Maximum number of characters to accept from user.
OUTPUTS:
STRING = String typed in by the user.
Maxlen = Actual number of characters typed by the user.
Ierr = 0 safe return, -1 the ESC key was pressed.
Copyright (c) 1987,1988 Marc A Norton All Rights Reserved.
MAY 1988 FAT-VIDEO 1.21 CGETRS Page V-59
CGETRS(ATTR,STRING,MAXLEN,IERR)
Get a string from the keyboard, echo it to the screen, and return
its length and error status. This routine only accepts integers and
the -,+ signs, and D,d,E,e characters. It is intended to accept
floating point numbers.
integer*2 attr,maxlen,ierr
character string*20
maxlen=20
call cgetrs(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Description:
This routine gets an floating point string from the user. It can
be no longer than maxlen, and the actual length typed is returned in
maxlen. Ierr is returned as zero if all went well. If the user
types the ESC key during string input the string is cleared and
the function returns ierr=-1. This allows a clean cancel
of the read function. The string characters are echoed as they
are typed, but with normal video attributes. This function uses
the BIOS keyboard functions, and cannot be interrupted by the
Ctrl-C or Ctrl-Break keypresses. Only integers and the -,+ signs
and D,d,E,e are accepted by this routine. This routine clears the
string prior to accepting any input.
The returned string is not null terminated and may be read into
an integer variable as follows:
real*8 R1
real*4 R2
character string*20
maxlen=20
call cput(' Enter a number: `')
call cgetrs(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Read(unit=string,fmt='(g20.0)')R1
maxlen=20
call cput(' Enter a number: `')
call cgetrs(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Read(unit=string,fmt='(g20.0)')R2
INPUTS:
ATTR = Attribute to use in echoing the string to the screen.
Maxlen = Maximum number of characters to accept from user.
OUTPUTS:
STRING = String typed in by the user.
Maxlen = Actual number of characters typed by the user.
Ierr = 0 safe return, -1 the ESC key was pressed.
Copyright (c) 1987,1988 Marc A Norton All Rights Reserved.
MAY 1988 FAT-VIDEO 1.21 CEDAS Page V-60
CEDAS(ATTR,STRING,MAXLEN,IERR)
Display a string with the attribute specified, allow the user
to edit it, and return its length and error status. The returned
string is null terminated.
integer*2 attr,maxlen,ierr
character string*40
maxlen=40
call cedas(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Description:
This routine gets an ascii string from the user. It can be no
longer than maxlen, and the actual length typed is returned in
maxlen. Ierr is returned as zero if all went well. If the user
types the ESC key during string input the string is cleared and
the function returns ierr=-1 . This allows a clean cancel
of the read function. The string characters are echoed as they
are typed, but with the video attribute given. This function uses
the BIOS keyboard functions, and cannot be interrupted by the
Ctrl-C or Ctrl-Break keypresses.
INPUTS:
ATTR = Attribute to use in echoing the string to the screen.
Maxlen = Maximum number of characters to accept from user.
OUTPUTS:
STRING = String typed in by the user.
Maxlen = Actual number of characters typed by the user.
Ierr = 0 safe return, -1 the ESC key was pressed.
Copyright (c) 1987,1988 Marc A Norton All Rights Reserved.
MAY 1988 FAT-VIDEO 1.21 CEDIS Page V-60
CEDIS(ATTR,STRING,MAXLEN,IERR)
Display a string in the attribute specified, allow the user to
edit the string, and return its length and error status. This
routine only accepts integers and the - sign.
integer*2 attr,maxlen,ierr
character string*10
maxlen=10
call cedis(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Description:
This routine gets an integer string from the user. It can be no
longer than maxlen, and the actual length typed is returned in
maxlen. Ierr is returned as zero if all went well. If the user
types the ESC key during string input the string is cleared and
the function returns ierr=-1 . This allows a clean cancel
of the read function. The string characters are echoed as they
are typed, but with normal video attributes. This function uses
the BIOS keyboard functions, and cannot be interrupted by the
Ctrl-C or Ctrl-Break keypresses. Only integers and the - sign
are accepted by this routine. This routine clears the string prior
to accepting any input.
The returned string is not null terminated and may be read into
an integer variable as follows:
real*8 R1
integer*2 I1
character*10 string
maxlen=10
call cput(' Enter a number: `')
call cedis(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Read(unit=string,fmt='(g10.0)')R1
I1 = R1
INPUTS:
ATTR = Attribute to use in echoing the string to the screen.
Maxlen = Maximum number of characters to accept from user.
OUTPUTS:
STRING = String typed in by the user.
Maxlen = Actual number of characters typed by the user.
Ierr = 0 safe return, -1 the ESC key was pressed.
Copyright (c) 1987,1988 Marc A Norton All Rights Reserved.
MAY 1988 FAT-VIDEO 1.21 CEDRS Page V-62
CEDRS(ATTR,STRING,MAXLEN,IERR)
Display a string with the specified attribute, allow the user to
edit it, and return its length and error status. This routine only
accepts integers and the -,+ signs, and D,d,E,e characters. It is
intended to accept floating point numbers.
integer*2 attr,maxlen,ierr
character string*10
maxlen=10
call cedrs(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Description:
This routine gets an floating point string from the user. It can
be no longer than maxlen, and the actual length typed is returned in
maxlen. Ierr is returned as zero if all went well. If the user
types the ESC key during string input the string is cleared and
the function returns ierr=-1 . This allows a clean cancel
of the read function. The string characters are echoed as they
are typed, but with normal video attributes. This function uses
the BIOS keyboard functions, and cannot be interrupted by the
Ctrl-C or Ctrl-Break keypresses. Only integers and the -,+ signs
and D,d,E,e are accepted by this routine. This routine clears the
string prior to accepting any input. The returned string is not
null terminated and may be read into an integer variable as
follows:
real*8 R1
real*4 R2
character string*20
maxlen=15
call cput(' Enter a number: `')
call cedrs(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Read(unit=string,fmt='(g10.0)')R1
maxlen=15
call cput(' Enter a number: `')
call cedrs(attr,string,maxlen,ierr)
if(ierr.eq.-1)return
Read(unit=string,fmt='(g10.0)')R2
INPUTS:
ATTR = Attribute to use in echoing the string to the screen.
Maxlen = Maximum number of characters to accept from user.
OUTPUTS:
STRING = String typed in by the user.
Maxlen = Actual number of characters typed by the user.
Ierr = 0 safe return, -1 the ESC key was pressed.
Copyright (c) 1987,1988 Marc A Norton All Rights Reserved.
MAY 1988 FAT-VIDEO 1.21 RQSTR Page V-63
RQST(WATTR,RATTR,ULR,ULC,NB,MESS,RESP,LEN,IERR)
Display a requestor, a window with a message that also
accepts a response from the user, and accept a response
string.
integer*2 wattr,rattr,ulr,ulc,nb,len,ierr
character mess*30,resp*60
mess = ' Enter A File Name`'
call clrstr(resp,int2(60))
call rqst(wattr,rattr,int2(-1),int2(-1),nb,mess,resp,len,ierr)
Description:
This routine displays a window and a message, and accepts a
response string using the CEDAS() function described above.
This allows you to provide a default response string. If
ulr=-1 and ulc=-1 the window requestor is centered automatically.
If the user presses the ESC key, the requestor returns with
ierr = -1. The len variable is input to indicate the maximum
length of the response string.
INPUTS:
wattr = windows attribute
rattr = response string attribute
ulr = upper left corner row of requestor, =-1 -> auto center
ulc = upper left corner column of requestor=-1 -> auto center
nb = 1 - one border line in window, 2- two border lines
mess = null terminated message to user
resp = default response string, may be blank, null terminated
len = max number of characters to allow in resonse string
RETURNS:
ierr = 0 if all went well, -1 if ESC key was used to exit
resp = null terminated response string
len = actual length of response string, not counting the null
character
Copyright (c) 1987,1988 Marc A Norton All Rights Reserved.