Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  IO.vdmrt   Sprache: VDM

 
class IO

--  Overture STANDARD LIBRARY: INPUT/OUTPUT
--      --------------------------------------------
-- Version 1.0.0 
-- 
-- Standard library for the Overture Interpreter. When the interpreter
-- evaluates the preliminary functions/operations in this file,
-- corresponding internal functions is called instead of issuing a run
-- time error. Signatures should not be changed, as well as name of
-- module (VDM-SL) or class (VDM++). Pre/post conditions is 
-- fully user customizable. 
-- Don't care's may NOT be used in the parameter lists.
--
-- The in/out functions  will return false if an error occurs. In this
-- case an internal error string will be set (see 'ferror').
--
-- File path:
--  * An absolute path is accepted and used as specified.
--  * A relative path is relative to the debugger or if running in the 
--      Overture IDE relative to the project root.
--

types
 
/**
 * The file directive used in in/out functions.
 */

public filedirective = <start>|<append> 

functions

/**
 * Write VDM value in ASCII format to the console.
 *
 * @param val the VDM value to be written
 * @return true if successful else false
 */

public static writeval[@p]: @p -> bool
writeval(val)==
  is not yet specified;

/**
 * Write VDM value in ASCII format to file. The type of the val must be
 * specified as fwriteval[seq of char](...) when calling the function.
 *
 * @param filename the name of the file
 * @param val the VDM value to be written.
 * @param fdir if <start> then it will overwrite an existing file, 
 *  else <append> will append output to the existing file
 * @return true if successful else false
 */

public static fwriteval[@p]:seq1 of char * @p * filedirective -> bool
fwriteval(filename,val,fdir) ==
  is not yet specified;

/**
 * Read VDM value in ASCII format from file. The type which should be read must be
 * specified as freadval[seq of char](...) when calling the function.
 *
 * @param filename the name of the file
 * @return mk_(success,@p) if successful success will be 
 * set to true else false. @p will hold nil if unsuccessful or the value read.
 */

publicstatic [@p: of -> *[]
freadval(filenamejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  not specified
  postlet(b,t)=RESULT in not  >t =nil

operations

/**
 * Write text to std out. Surrounding double quotes will be stripped,
 * backslashed characters should be interpreted.
 *
 * @param text the text to write to the console
 * @return if successful true else false.
 */

public *  else <append> will append * @return truejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
echo(text) ==
  fecho fwriteval(ilename,alfdir=

/**
 * Write text to file like <code>echo</code>.
 *
 * @param filename the name of the file
 * @param text the text to write to be written.
 * @param fdir if nil or <start> then it will overwrite an existing file, 
 *  else <append> will append output to the existing file.
 * @return true if successful else false
 */

public fecho: seq of char * seq of char * [filedirective] ==> bool
fecho  * specified as freadval  * @param filename  * @return mk_(success * set to true else false. @p will hold
   not specified
  pre filename =   not  specified

/**
 * Returns the last error which may have occurred by any of the io/out functions
 *
 * @return the last error message
 */

 ferror  =  ofchar
ferror( =
  is not yet specified;
  
-- New simplified format printing operations


/**
 * Prints any VDM value to the console
 *
 * @param arg a VDM value of any type
 */

public static print:echotextjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
print(arg) ==
 *

/**
 * Prints any VDM value to the console as a new line
 *
 * @param arg a VDM value of any type
 */

public static printlnl append output  * 
printlnarg
    is (filename,fdirjava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29

/**
 * Prints any VDM value to the console
 *
 * @param format standard format string used in
 *  Java by <code>String.format(format, value)</code>,
 *  though note that only the %s conversion is supported.
 *  eg. <code>printf("Hello [%2$-5s][%1$5s]\n", [123, {2}])</code>
 *  would produce <code>Hello [{2}  ][  123]</code> and a newline.
 *
 * @param arg a sequence of VDM values of any type
 */

public static printf ( =
printfformat) ==
    is not yet specified

end IO

Messung V0.5
C=86 H=100 G=93

¤ Dauer der Verarbeitung: 0.4 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge