文档下载 文档下载导航
设为首页 | 加入收藏
搜索 请输入内容:  
 导航当前位置: 文档下载 > 所有分类 > 高等教育 > 工学 > text_io
侵权投诉

text_io

VHDL text io

Text I/O

One of the prede ned packages n the STD library that is supplied with VHDLis “TEXTIO” It may be accessed if you include the statement:

USE STD.TEXTIO.ALL;

Thispackagecontainsproceduresandfunctionsthatprovidetheabilitytoreadand write ASCII text les.

TEXTIO considers les to be les of lines, where a line is a carriage returnterminated text string.

The package de nes a number of types that can be used with text les. A

variableoftypeLINEisde nedtoholdalineoftext.ThelineisthebasicunituponwhichTEXTIOoperates.Forexample,toreadasetofvaluesfroma le,thelineis rstread,andthentheindividualelementsoftheline.TheTEXTIOpackage provides the necessary functions to do this.

Procedures most commonly used:

endfile(file_name)

--returns boolean true is the end of file is reached

readline(input_file_name, input_line_variable)

--readsanewlineintothelinevariablefromtheinputfilewriteline(output_file_name, output_line_variable)

--writesanewlinefromthelinevariabletotheoutputfileread(input_line_variable, variable_read)

--reads the next available variable from the line

write(output_line_variable, variable_to_write)

--writes an new variable into the line

第1页

你可能喜欢

热门文档

相关文档

  • 多种程序语言的Hello_World程序

    Ada with Ada.Text_IO; procedure Hello is begin Ada.Text_IO.Put_Line("Hello World!"); end Hello; 2. ALGOL68 \'begin\' print("Hello World!") ...

  • IO操作

    IO操作_计算机软件及应用_IT/计算机_专业资料。关于c++的IO操作在...(text file)和二进制文件(binary file)的计算方法都 是不同的,因为文本模式的...

  • 8new_subtyp_enum

    110; package ages_io is new TEXT_IO.INTEGER_IO (ages); type measurement is digits 10; package measurement_io is new TEXT_IO.FLOAT_IO (measurement)...

  • NSIS MUI 教程

    insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)" 实现类似功能。 欢迎页面属性 MUI_WELCOMEPAGE_TITLE title 显示在欢迎向导页上的标题...

  • _java.io包和输入输出

    java.io.IOException; import java.io.InputStream; import java.io.FileInputStream; 构造一个文件输入流对象 File f = new File(“text.txt”); InputStream...

  • Ada_程序设计语言

    但上 7 例调用过程 Put 和 New_Line 的方法比较罗嗦,因此我们也可以使用 use 语句: 000 -- filename:hello.adb; 001 with Ada.Text_IO; use Ada.Text_...

  • cSharp中下IO操作

    { StreamWriter SW; SW = File.CreateText(@"c:MyTextFile.txt"); SW....namespace="System.IO"%> <Script runat=server> public void DeleteFolder(...

  • Ada基础教程

    但上 7 例调用过程 Put 和 New_Line 的方法比较罗嗦,因此我们也可以使用 use 语句: 000 — filename:hello.adb; 001 with Ada.Text_IO; use Ada.Text_IO...

  • IO流操作

    java.io.IOException; import java.io.FileInputStream; 构造一个文件输入流对象 FileInputStream fileobject = new FileInputStream(“text.txt”); 用FileInput...

  • 各种语言的HelloWorld编程

    (1=1) : WRITE "Hello World " Ada 语言的 Hello World 程序 with Ada.Text_Io; use Ada.Text_Io; procedure Hello is begin Put_Line ("Hello, world...

站点地图 | 文档上传 | 侵权投诉 | 手机版
本站所有资源均来自互联网,本站只负责收集和整理,均不承担任何法律责任,如有侵权等其它行为请联系我们.
文档下载 Copyright 2013 doc.guandang.net All Rights Reserved.  -  email