请翻译str的帮助文件(10分)

  • 主题发起人 日出 东方
  • 开始时间

日出 东方

Unregistered / Unconfirmed
GUEST, unregistred user!
Formats a string and returns it to a variable.
Unit
System
Category
string handling routines
procedure Str(X [: Width [: Decimals ]];
var S);
Description
Str converts X to a string representation according to the Width
and Decimals formatting parameters. The effect is like a call to
Write except the resulting string is stored in S instead of being
written to a text file.
X is an integer-type or real-type expression. Width and Decimals are
integer-type expressions. S is a string-type variable or a zero-based
character array variable if extended syntax is enabled.
大家讲讲这个是什么意思阿?谢谢
 
C

cgp

Unregistered / Unconfirmed
GUEST, unregistred user!
Str 根据参数Width 和 Decimals格式化,效果就象Write 一样,串存于S中而不是写到文本文件中

X是正型或实型表达,Width and Decimals 是整型表达式 S 字符串变量或0基准数组。
例:Edit1.Txet:=str(247247.88:7:2,S);
 

小八哥

Unregistered / Unconfirmed
GUEST, unregistred user!
格式化一个字符串并返回一个字符串变量
Unit
System

类别
字符串处理程序
procedure Str(X [: Width [: Decimals ]];
var S);
描述
Str根据Width和Decimal参数把X转换成一个字符串.它的作用就相当于调用写过程
但这个写过程是把结果写在S中,而不是写入一个文本文件.
X是一个整数或实数表达式.
Width 和 Decimals 是整型表达式.
S是一个字符串类型变量
如果扩展语法被起用的话还可以是一个以0为起始下标的字符数组变量.
 
T

Traveller

Unregistered / Unconfirmed
GUEST, unregistred user!
Decimals就是小数位数的意思
 

日出 东方

Unregistered / Unconfirmed
GUEST, unregistred user!
traveller就不给你了。你的分很多阿
 

Similar threads

I
回复
0
查看
523
import
I
I
回复
0
查看
799
import
I
I
回复
0
查看
625
import
I
I
回复
0
查看
474
import
I
I
回复
0
查看
1K
import
I
顶部