How to convert integer 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) ?
How to convert integer to decimal point in PROLOG? Example, imagine I assign Integer
Share
It’s not an assignment but Integer is unified with 10 and can’t be changed thereafter.
You could write
Integer2 is 1.0 * IntegerorInteger2 is float(Integer)at least in some Prolog implementations.