用Scheme语言评估浮点变量 [英] Evaluating a floating point variable in Scheme language

查看:58
本文介绍了用Scheme语言评估浮点变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在Ansys Fluent中读取多个数据文件(总共10个).我写了一个使用计划语言的日记文件

I want to read multiple data files (10 in total) in Ansys Fluent. I wrote a journal file which uses scheme language

(Do ((count 11.100 (+ count 0.100))) ((>= count 12.000))
(ti-menu-load-string (format #f "file read-data data-~a.dat" count)))

文件名的格式类似于data-11.200.dat,但是程序将其读取为data-11.2.dat.如何强制它读取小数点后的浮点数?

The format of the file name is like data-11.200.dat, but the program reads it as data-11.2.dat. How I can force it to read the floating point numbers after the decimal point?

我当然可以重命名数据文件,但这对我不得不多次使用代码没有用. 我已经尝试过data-~03d.dat,但这没用!

Of course I can rename the data files, but that is not useful for I have to use the code many times. I have tried data-~03d.dat, but that didn't work!

推荐答案

我想我已经知道了:

data-~.3f.dat

这篇关于用Scheme语言评估浮点变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆