Guidance
指路人
g.yi.org
Upload / Forum Attachment / Reginald Rexx Programming Language Compiler User Forum Attachments and Pictures / 13607-test_charin.rex

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
/* */

ansi_filein = "H:\test_file.dat"

rc = open_file()

/* This SHOULD reset the pointer to the first byte ... */
temp = CHARIN(ansi_filein, 1) 
/* ... and read 72 bytes from byte 1. In fact it skips byte 1 and starts with 2 */
line = CHARIN(ansi_filein, , 72)
SAY '§§§'line'§§§'

/* Here we close the file and reopen it */
temp = STREAM(ansi_filein, 'C', 'CLOSE')
temp = open_file(ansi_filein)
/* NOW we get bytes 1-72 */
line = CHARIN(ansi_filein, , 72)
SAY '§§§'line'§§§'

RETURN 0

open_file:

DO
	STREAM(ansi_filein, 'C', 'OPEN READ SHARED')
	CATCH NOTREADY
		temp = STREAM(ansi_filein, 'D')
		RETURN '0001' || temp
END	

total_bytes = STREAM(ansi_filein, "C", "QUERY SIZE")

RETURN 0
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2024-7-27  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2012-06-02 19:52:21