- Rexx 教程
- Rexx —— 首頁
- Rexx —— 概述
- Rexx —— 環境
- Rexx —— 安裝
- Rexx —— 外掛安裝
- Rexx —— 基本語法
- Rexx —— 資料型別
- Rexx —— 變數
- Rexx —— 運算子
- Rexx —— 陣列
- Rexx —— 迴圈
- Rexx —— 決策制定
- Rexx —— 數字
- Rexx —— 字串
- Rexx —— 函式
- Rexx —— 棧
- Rexx —— 檔案輸入/輸出
- Rexx —— 檔案函式
- Rexx —— 子例程
- Rexx —— 內建函式
- Rexx —— 系統命令
- Rexx —— XML
- Rexx —— Regina
- Rexx —— 解析
- Rexx —— 訊號
- Rexx —— 除錯
- Rexx —— 錯誤處理
- Rexx —— 面向物件
- Rexx —— 可移植性
- Rexx —— 擴充套件函式
- Rexx —— 指令
- Rexx —— 實現
- Rexx —— Netrexx
- Rexx —— Brexx
- Rexx —— 資料庫
- 手持和嵌入式
- Rexx —— 效能
- Rexx —— 最佳程式設計實踐
- Rexx —— 圖形使用者介面
- Rexx —— Reginald
- Rexx —— Web 程式設計
- Rexx 有用資源
- Rexx —— 快速指南
- Rexx —— 有用資源
- Rexx —— 討論
Rexx —— 字元
此函式返回 1 或檔案本身中剩餘可讀字元數。檔名作為函式的引數提及。
語法
chars(filename)
引數
filename - 這是需要確定其檔案結束的檔案的名稱。
返回值
此函式返回 1 或檔案本身中剩餘可讀字元數。
示例
/* Main program */ str = '' do j = 1 while chars(Example.txt) > 0 str = ' ' (charin(Example.txt)) call charout ,str end
例如:`Rexx_file_eof.rexx`——
上述程式中需要注意以下事項 -
首先,一個字串變數被分配為一個空值。
然後使用“do loop”一次讀取一個字元。
每個字元被讀取併發送到控制檯。
當我們執行上面的程式時,將得到以下結果。
E x a m p l e 1 E x a m p l e 2 E x a m p l e 3
輸出
列印頁面
廣告