开发者

How to convert integer to decimal point in PROLOG?

How to convert integ开发者_高级运维er to decimal point in PROLOG? Example, imagine I assign Integer = 10 How do I change integer's value to turn to 1.0 (1 decimal point) ?


It's not an assignment but Integer is unified with 10 and can't be changed thereafter.

You could write Integer2 is 1.0 * Integer or Integer2 is float(Integer) at least in some Prolog implementations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜