ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
Nice!
How do i round off a real number or any other number to certain decimal values?
You should use the RoundTo function. Like this:rNum := RoundTo( 22/7 , -2 )The -2 after the comma means to 2 decimal places, -1 would be to 1 decimal place, -3 to three decimal places, and so on. But you will need to add Math at the top under Uses
I am trying to do the Inc procedure but with real variablesIt does not seem to workPlease hel0
Inc only works with ordinal types like integers. real variables are not ordinal. You can do this instead:rNum := rNum + 1 ;
thanks
Why must we have a rInput variable ?
Which aspect are you referring too?
@@MrLongITandCAT No worry sir I have figured it out
:)
Nice!
How do i round off a real number or any other number to certain decimal values?
You should use the RoundTo function. Like this:
rNum := RoundTo( 22/7 , -2 )
The -2 after the comma means to 2 decimal places, -1 would be to 1 decimal place, -3 to three decimal places, and so on. But you will need to add Math at the top under Uses
I am trying to do the Inc procedure but with real variables
It does not seem to work
Please hel0
Inc only works with ordinal types like integers. real variables are not ordinal. You can do this instead:
rNum := rNum + 1 ;
thanks
Why must we have a rInput variable ?
Which aspect are you referring too?
@@MrLongITandCAT No worry sir I have figured it out
:)