找回密码
 注册
Simdroid-非首页
查看: 145|回复: 4

[PCL] 请教关于pcl的text_write()

[复制链接]
发表于 2011-7-18 18:13:19 | 显示全部楼层 |阅读模式 来自 北京
text_write ( chan, fmt, ints, reals, chars )
Description:
Write formatted records of mixed data to a text I/O file.
Input:
INTEGER chan Channel from a previous call to text_open or zero to write to
standard output (xterm window).
STRING fmt Format string governing how conversion is done.
INTEGER() ints Integer data to convert for the write.
REAL() reals Real data to convert for the write.
CSTRING[]() chars String data to convert for the write.

其中的fmt是什么样的??谁能给个例子么???
发表于 2011-7-19 23:00:21 | 显示全部楼层 来自 加拿大
Simdroid开发平台
%s, %d等输出格式,自己找找
回复 不支持

使用道具 举报

发表于 2011-7-20 14:22:36 | 显示全部楼层 来自 浙江杭州
real reals(6)
integer ints(3)
string  chars [20](3)

text_write ( chan, "%3I% %6F% %3A%", ints, reals, chars )
回复 不支持

使用道具 举报

发表于 2012-2-22 19:48:00 | 显示全部楼层 来自 上海
happy2008wcb 发表于 2011-7-20 14:22
real reals(6)
integer ints(3)
string  chars [20](3)

请问下:%rIm.nf%  代表的是什么  其中的r,m,n f都是什么个意义?
回复 不支持

使用道具 举报

发表于 2012-3-24 02:12:57 | 显示全部楼层 来自 浙江杭州
wijake 发表于 2012-2-22 19:48
请问下:%rIm.nf%  代表的是什么  其中的r,m,n f都是什么个意义?

此处,?I代表格式为整形integer,F代表float实型,A代表字符串类型,其他的m,n代表你要写的变量赋予的最高的长度字符位数空间
回复 不支持

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

Simapps系列直播

Archiver|小黑屋|联系我们|仿真互动网 ( 京ICP备15048925号-7 )

GMT+8, 2024-9-30 14:17 , Processed in 0.034629 second(s), 10 queries , Gzip On, MemCache On.

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表