Go to the first, previous, next, last section, table of contents.


printf, fprintf, sprintf

printf(format[,args])
fprintf(fd,format[,args])
sprintf(format[,args])
:: C に似たプリント関数
return
整数(printf,fprintf), 文字列(sprintf)
format
文字列
fd
非負整数(ファイル記述子)
args
オブジェクト
[0] printf("%a: rat = %a\n",10,x^2-1)$
10: rat = x^2-1
[1] S=sprintf("%a: rat = %a",20,x^2-1)$
[2] S;
20: rat = x^2-1
[3] Fd=open_file("hoge.txt","w");
0
[4] fprintf(Fd,"Poly=%a\n",(x-1)^3)$
[5] close_file(Fd)$
[6] quit;

$ cat hoge.txt
Poly=x^3-3*x^2+3*x-1
参照
@xref{rtostr},@xref{open_file},@xref{close_file}

ChangeLog


Go to the first, previous, next, last section, table of contents.