在C语言中有个这个的函数:Format 或 Printf比如 format("this is %s, it's %d Yuan.", "book", 50)
那么得到手结果就是 this is a book, it's 50 Yuan.
%s 表示字符串
%d 表示整型。
还可以设置小数点个数之类的。请问在VB中怎么实现,不会是用Replace吧??
那么得到手结果就是 this is a book, it's 50 Yuan.
%s 表示字符串
%d 表示整型。
还可以设置小数点个数之类的。请问在VB中怎么实现,不会是用Replace吧??
变量1="book"
变量2=50
string1="this is " & 变量1 & ",it's " & cstr(变量2) & "yuan."
msgbox string1
这样的态度,能问出来才怪
dim aa2 as string
aa1="a"
aa2="50"
msbox "this is " & aa1 & ", it's " & aa2 & " Yuan."