home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS - Coast to Coast / simteldosarchivecoasttocoast2.iso / fortran / fv121s.zip / FAT4.DOC < prev    next >
Text File  |  1988-06-08  |  16KB  |  449 lines

  1.  
  2.         MAY 1988                FAT-VIDEO 1.21  CLRSTR          Page V-55
  3.  
  4.  
  5.  
  6.         CLRSTR(STRING,LEN)
  7.  
  8.           Clear a string by filling with blanks, the space character.
  9.  
  10.         character*132 string1
  11.         character*1   string2(132)
  12.         integer*2     len
  13.  
  14.         len=132
  15.         call clrstr(string1,len)
  16.         call clrstr(string2,len)
  17.  
  18.         inputs:  string,len
  19.         returns: string
  20.  
  21.         Description:
  22.  
  23.           This function fills each byte in the string with the space
  24.         character, up to the length specified.
  25.  
  26.  
  27.  
  28.  
  29.         REMNUL(STRING)
  30.  
  31.           This routine remove the null character( char(0)) an the
  32.        '`' character, and replaces them with a space character.
  33.  
  34.         character*20 string
  35.         call remnul(string)
  36.  
  37.         Description:
  38.  
  39.           This function is used to remove the null character in null
  40.         terminated strings, to allow Fortran functions to use the string
  41.         data.
  42.  
  43.  
  44.         MAY 1988                FAT-VIDEO 1.21  CGETS           Page V-56
  45.  
  46.  
  47.  
  48.         CGETS(STRING,MAXLEN,IERR)
  49.  
  50.           Get a string from the keyboard, echo it to the screen, and return
  51.         its length and error status. The returned string is null terminated.
  52.  
  53.         integer*2 maxlen,ierr
  54.         character string*40
  55.  
  56.         maxlen=40
  57.         call cgets(string,maxlen,ierr)
  58.         if(ierr.eq.-1)return
  59.  
  60.         Description:
  61.  
  62.           This routine gets an ascii string from the user. It can be no
  63.         longer than maxlen, and the actual length typed is returned in
  64.         maxlen. Ierr is returned as zero if all went well. If the user
  65.         types the ESC key during string input the string is cleared and
  66.         the function returns ierr=-1 . This allows a clean cancel
  67.         of the read function. The string characters are echoed as they
  68.         are typed, but with normal video attributes. This function uses
  69.         the BIOS keyboard functions, and cannot be interrupted by the
  70.         Ctrl-C or Ctrl-Break keypresses. This function clears the string
  71.         prior to accepting any input.
  72.  
  73.         INPUTS:
  74.         Maxlen = Maximum number of characters to accept from user.
  75.  
  76.         OUTPUTS:
  77.         STRING = String typed in by the user.
  78.         Maxlen = Actual number of characters typed by the user.
  79.         Ierr   = 0 safe return, -1 the ESC key was pressed.
  80.  
  81.  
  82.  
  83.         Copyright (c) 1987,1988    Marc A Norton   All Rights Reserved.
  84.  
  85.  
  86.         MAY 1988                FAT-VIDEO 1.21  CGETAS           Page V-58
  87.  
  88.         CGETAS(ATTR,STRING,MAXLEN,IERR)
  89.  
  90.           Get a string from the keyboard, echo it to the screen using the
  91.         attribute specified, and return its length and error status. The
  92.         returned string is null terminated.
  93.  
  94.         integer*2 attr,maxlen,ierr
  95.         character string*40
  96.  
  97.         maxlen=40
  98.         call cgetas(attr,string,maxlen,ierr)
  99.         if(ierr.eq.-1)return
  100.  
  101.         Description:
  102.  
  103.           This routine gets an ascii string from the user. It can be no
  104.         longer than maxlen, and the actual length typed is returned in
  105.         maxlen. Ierr is returned as zero if all went well. If the user
  106.         types the ESC key during string input the string is cleared and
  107.         the function returns ierr=-1 . This allows a clean cancel
  108.         of the read function. The string characters are echoed as they
  109.         are typed, but with the video attribute given. This function uses
  110.         the BIOS keyboard functions, and cannot be interrupted by the
  111.         Ctrl-C or Ctrl-Break keypresses. This function clears the string
  112.         prior to accepting any input.
  113.  
  114.         INPUTS:
  115.         ATTR   = Attribute to use in echoing the string to the screen.
  116.         Maxlen = Maximum number of characters to accept from user.
  117.  
  118.         OUTPUTS:
  119.         STRING = String typed in by the user.
  120.         Maxlen = Actual number of characters typed by the user.
  121.         Ierr   = 0 safe return, -1 the ESC key was pressed.
  122.  
  123.  
  124.  
  125.         Copyright (c) 1987,1988    Marc A Norton   All Rights Reserved.
  126.  
  127.  
  128.         MAY 1988                FAT-VIDEO 1.21  CGETIS           Page V-58
  129.  
  130.  
  131.  
  132.         CGETIS(ATTR,STRING,MAXLEN,IERR)
  133.  
  134.           Get a string from the keyboard, echo it to the screen, and return
  135.         its length and error status. This routine only accepts integers and
  136.         the - sign.
  137.  
  138.         integer*2 attr,maxlen,ierr
  139.         character string*20
  140.  
  141.         maxlen=20
  142.         call cgetis(attr,string,maxlen,ierr)
  143.         if(ierr.eq.-1)return
  144.  
  145.         Description:
  146.  
  147.           This routine gets an integer string from the user. It can be no
  148.         longer than maxlen, and the actual length typed is returned in
  149.         maxlen. Ierr is returned as zero if all went well. If the user
  150.         types the ESC key during string input the string is cleared and
  151.         the function returns ierr=-1 . This allows a clean cancel
  152.         of the read function. The string characters are echoed as they
  153.         are typed, but with normal video attributes. This function uses
  154.         the BIOS keyboard functions, and cannot be interrupted by the
  155.         Ctrl-C or Ctrl-Break keypresses. Only integers and the - sign
  156.         are accepted by this routine. This routine clears the string prior
  157.         to accepting any input.
  158.           The returned string is not null terminated and may be read into
  159.         an integer variable as follows:
  160.  
  161.         real*8    R1
  162.         integer*2 I1
  163.         character*20 string
  164.  
  165.         maxlen=20
  166.         call cput(' Enter a number: `')
  167.         call cgetis(attr,string,maxlen,ierr)
  168.         if(ierr.eq.-1)return
  169.         Read(unit=string,fmt='(g20.0)')R1
  170.         I1 = R1
  171.  
  172.         INPUTS:
  173.         ATTR   = Attribute to use in echoing the string to the screen.
  174.         Maxlen = Maximum number of characters to accept from user.
  175.  
  176.         OUTPUTS:
  177.         STRING = String typed in by the user.
  178.         Maxlen = Actual number of characters typed by the user.
  179.         Ierr   = 0 safe return, -1 the ESC key was pressed.
  180.  
  181.         Copyright (c) 1987,1988    Marc A Norton   All Rights Reserved.
  182.  
  183.  
  184.         MAY 1988                FAT-VIDEO 1.21  CGETRS           Page V-59
  185.  
  186.  
  187.  
  188.  
  189.         CGETRS(ATTR,STRING,MAXLEN,IERR)
  190.  
  191.           Get a string from the keyboard, echo it to the screen, and return
  192.         its length and error status. This routine only accepts integers and
  193.         the -,+ signs, and D,d,E,e characters. It is intended to accept
  194.         floating point numbers.
  195.  
  196.         integer*2 attr,maxlen,ierr
  197.         character string*20
  198.  
  199.         maxlen=20
  200.         call cgetrs(attr,string,maxlen,ierr)
  201.         if(ierr.eq.-1)return
  202.  
  203.         Description:
  204.  
  205.           This routine gets an floating point string from the user. It can
  206.         be no longer than maxlen, and the actual length typed is returned in
  207.         maxlen. Ierr is returned as zero if all went well. If the user
  208.         types the ESC key during string input the string is cleared and
  209.         the function returns ierr=-1. This allows a clean cancel
  210.         of the read function. The string characters are echoed as they
  211.         are typed, but with normal video attributes. This function uses
  212.         the BIOS keyboard functions, and cannot be interrupted by the
  213.         Ctrl-C or Ctrl-Break keypresses. Only integers and the -,+ signs
  214.         and D,d,E,e are accepted by this routine. This routine clears the
  215.         string prior to accepting any input.
  216.            The returned string is not null terminated and may be read into
  217.         an integer variable as follows:
  218.  
  219.         real*8    R1
  220.         real*4    R2
  221.         character string*20
  222.  
  223.         maxlen=20
  224.         call cput(' Enter a number: `')
  225.         call cgetrs(attr,string,maxlen,ierr)
  226.         if(ierr.eq.-1)return
  227.         Read(unit=string,fmt='(g20.0)')R1
  228.  
  229.         maxlen=20
  230.         call cput(' Enter a number: `')
  231.         call cgetrs(attr,string,maxlen,ierr)
  232.         if(ierr.eq.-1)return
  233.         Read(unit=string,fmt='(g20.0)')R2
  234.  
  235.         INPUTS:
  236.         ATTR   = Attribute to use in echoing the string to the screen.
  237.         Maxlen = Maximum number of characters to accept from user.
  238.         OUTPUTS:
  239.         STRING = String typed in by the user.
  240.         Maxlen = Actual number of characters typed by the user.
  241.         Ierr   = 0 safe return, -1 the ESC key was pressed.
  242.  
  243.         Copyright (c) 1987,1988    Marc A Norton   All Rights Reserved.
  244.  
  245.  
  246.  
  247.         MAY 1988                FAT-VIDEO 1.21  CEDAS           Page V-60
  248.  
  249.  
  250.  
  251.         CEDAS(ATTR,STRING,MAXLEN,IERR)
  252.  
  253.           Display a string with the attribute specified, allow the user
  254.         to edit it, and return its length and error status. The returned
  255.         string is null terminated.
  256.  
  257.         integer*2 attr,maxlen,ierr
  258.         character string*40
  259.  
  260.         maxlen=40
  261.         call cedas(attr,string,maxlen,ierr)
  262.         if(ierr.eq.-1)return
  263.  
  264.         Description:
  265.  
  266.           This routine gets an ascii string from the user. It can be no
  267.         longer than maxlen, and the actual length typed is returned in
  268.         maxlen. Ierr is returned as zero if all went well. If the user
  269.         types the ESC key during string input the string is cleared and
  270.         the function returns ierr=-1 . This allows a clean cancel
  271.         of the read function. The string characters are echoed as they
  272.         are typed, but with the video attribute given. This function uses
  273.         the BIOS keyboard functions, and cannot be interrupted by the
  274.         Ctrl-C or Ctrl-Break keypresses.
  275.  
  276.         INPUTS:
  277.         ATTR   = Attribute to use in echoing the string to the screen.
  278.         Maxlen = Maximum number of characters to accept from user.
  279.         OUTPUTS:
  280.         STRING = String typed in by the user.
  281.         Maxlen = Actual number of characters typed by the user.
  282.         Ierr   = 0 safe return, -1 the ESC key was pressed.
  283.  
  284.         Copyright (c) 1987,1988    Marc A Norton   All Rights Reserved.
  285.  
  286.  
  287.         MAY 1988                FAT-VIDEO 1.21  CEDIS           Page V-60
  288.  
  289.  
  290.  
  291.         CEDIS(ATTR,STRING,MAXLEN,IERR)
  292.  
  293.           Display a string in the attribute specified, allow the user to
  294.         edit the string, and return its length and error status. This
  295.         routine only accepts integers and the - sign.
  296.  
  297.         integer*2 attr,maxlen,ierr
  298.         character string*10
  299.  
  300.         maxlen=10
  301.         call cedis(attr,string,maxlen,ierr)
  302.         if(ierr.eq.-1)return
  303.  
  304.         Description:
  305.  
  306.           This routine gets an integer string from the user. It can be no
  307.         longer than maxlen, and the actual length typed is returned in
  308.         maxlen. Ierr is returned as zero if all went well. If the user
  309.         types the ESC key during string input the string is cleared and
  310.         the function returns ierr=-1 . This allows a clean cancel
  311.         of the read function. The string characters are echoed as they
  312.         are typed, but with normal video attributes. This function uses
  313.         the BIOS keyboard functions, and cannot be interrupted by the
  314.         Ctrl-C or Ctrl-Break keypresses. Only integers and the - sign
  315.         are accepted by this routine. This routine clears the string prior
  316.         to accepting any input.
  317.           The returned string is not null terminated and may be read into
  318.         an integer variable as follows:
  319.  
  320.         real*8       R1
  321.         integer*2    I1
  322.         character*10 string
  323.         maxlen=10
  324.         call cput(' Enter a number: `')
  325.         call cedis(attr,string,maxlen,ierr)
  326.         if(ierr.eq.-1)return
  327.         Read(unit=string,fmt='(g10.0)')R1
  328.         I1 = R1
  329.  
  330.         INPUTS:
  331.         ATTR   = Attribute to use in echoing the string to the screen.
  332.         Maxlen = Maximum number of characters to accept from user.
  333.  
  334.         OUTPUTS:
  335.         STRING = String typed in by the user.
  336.         Maxlen = Actual number of characters typed by the user.
  337.         Ierr   = 0 safe return, -1 the ESC key was pressed.
  338.  
  339.         Copyright (c) 1987,1988    Marc A Norton   All Rights Reserved.
  340.  
  341.  
  342.         MAY 1988                FAT-VIDEO 1.21  CEDRS           Page V-62
  343.  
  344.  
  345.  
  346.         CEDRS(ATTR,STRING,MAXLEN,IERR)
  347.  
  348.           Display a string with the specified attribute, allow the user to
  349.         edit it, and return its length and error status. This routine only
  350.         accepts integers and the -,+ signs, and D,d,E,e characters. It is
  351.         intended to accept floating point numbers.
  352.  
  353.         integer*2 attr,maxlen,ierr
  354.         character string*10
  355.  
  356.         maxlen=10
  357.         call cedrs(attr,string,maxlen,ierr)
  358.         if(ierr.eq.-1)return
  359.  
  360.         Description:
  361.  
  362.           This routine gets an floating point string from the user. It can
  363.         be no longer than maxlen, and the actual length typed is returned in
  364.         maxlen. Ierr is returned as zero if all went well. If the user
  365.         types the ESC key during string input the string is cleared and
  366.         the function returns ierr=-1 . This allows a clean cancel
  367.         of the read function. The string characters are echoed as they
  368.         are typed, but with normal video attributes. This function uses
  369.         the BIOS keyboard functions, and cannot be interrupted by the
  370.         Ctrl-C or Ctrl-Break keypresses. Only integers and the -,+ signs
  371.         and D,d,E,e are accepted by this routine. This routine clears the
  372.         string prior to accepting any input. The returned string is not
  373.         null terminated and may be read into an integer variable as
  374.         follows:
  375.  
  376.         real*8    R1
  377.         real*4    R2
  378.         character string*20
  379.         maxlen=15
  380.         call cput(' Enter a number: `')
  381.         call cedrs(attr,string,maxlen,ierr)
  382.         if(ierr.eq.-1)return
  383.         Read(unit=string,fmt='(g10.0)')R1
  384.  
  385.         maxlen=15
  386.         call cput(' Enter a number: `')
  387.         call cedrs(attr,string,maxlen,ierr)
  388.         if(ierr.eq.-1)return
  389.         Read(unit=string,fmt='(g10.0)')R2
  390.  
  391.         INPUTS:
  392.         ATTR   = Attribute to use in echoing the string to the screen.
  393.         Maxlen = Maximum number of characters to accept from user.
  394.         OUTPUTS:
  395.         STRING = String typed in by the user.
  396.         Maxlen = Actual number of characters typed by the user.
  397.         Ierr   = 0 safe return, -1 the ESC key was pressed.
  398.  
  399.         Copyright (c) 1987,1988    Marc A Norton   All Rights Reserved.
  400.  
  401.  
  402.         MAY 1988                FAT-VIDEO 1.21  RQSTR           Page V-63
  403.  
  404.  
  405.  
  406.         RQST(WATTR,RATTR,ULR,ULC,NB,MESS,RESP,LEN,IERR)
  407.  
  408.            Display a requestor, a window with a message that also
  409.         accepts a response from the user, and accept a response
  410.         string.
  411.  
  412.         integer*2   wattr,rattr,ulr,ulc,nb,len,ierr
  413.         character   mess*30,resp*60
  414.  
  415.         mess = ' Enter A File Name`'
  416.         call clrstr(resp,int2(60))
  417.         call rqst(wattr,rattr,int2(-1),int2(-1),nb,mess,resp,len,ierr)
  418.  
  419.         Description:
  420.  
  421.           This routine displays a window and a message, and accepts a
  422.         response string using the CEDAS() function described above.
  423.         This allows you to provide a default response string. If
  424.         ulr=-1 and ulc=-1 the window requestor is centered automatically.
  425.         If the user presses the ESC key, the requestor returns with
  426.         ierr = -1. The len variable is input to indicate the maximum
  427.         length of the response string.
  428.  
  429.  
  430.         INPUTS:
  431.         wattr = windows attribute
  432.         rattr = response string attribute
  433.         ulr   = upper left corner row of requestor, =-1 -> auto center
  434.         ulc   = upper left corner column of requestor=-1 -> auto center
  435.         nb    = 1 - one border line in window, 2- two border lines
  436.         mess  = null terminated message to user
  437.         resp  = default response string, may be blank, null terminated
  438.         len   = max number of characters to allow in resonse string
  439.  
  440.         RETURNS:
  441.         ierr  = 0 if all went well, -1 if ESC key was used to exit
  442.         resp  = null terminated response string
  443.         len   = actual length of response string, not counting the null
  444.                 character
  445.  
  446.  
  447.  
  448.         Copyright (c) 1987,1988    Marc A Norton   All Rights Reserved.
  449.