Operating System - Microsoft
1753776 Members
7044 Online
108799 Solutions
New Discussion

using Val function to convert string to integer in Borland Pascal 7.0

 

using Val function to convert string to integer in Borland Pascal 7.0

Hi fellow experts,

I have used the function Val(x,y,i) to convert
string to integer. where x:string;,y:Longint;i:Integer.
This worked very well on a compaq computer, But using the same function on a Dell Computer with Win2000 only producing a Zero on "y" which is supposed to have the converted value.

Does the Make of the Machine affect the execution of the function? or maybe someone has another way of doing it.

Somebody assist.

Bonnie.


1 REPLY 1

Re: using Val function to convert string to integer in Borland Pascal 7.0

The problem was the value i was trying to convert to integer had a decimal point and due to that the function was returning a zero.