Author Topic: Finance code https://bcxbasiccoders.com/mrbcx_samples/Finance.zip  (Read 108 times)

Peter1956nl

  • Newbie
  • *
  • Posts: 6
    • View Profile
Hello Mr. BCX,

I'm trying to recompile your source code from the Finance examples with PellesC version 10. I left the source code unchanged.
All the code compiles well, but running the exe files give a $NAN . Your originial exe files give the correct results.

Peter

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 680
    • View Profile
Re: Finance code https://bcxbasiccoders.com/mrbcx_samples/Finance.zip
« Reply #1 on: October 29, 2020, 05:17:43 PM »
Peter ... thank you for the homework assignment   :D

Seriously ... I'll have a look and will let you know what I discover.

MrBcx

  • Administrator
  • Hero Member
  • *****
  • Posts: 680
    • View Profile
Re: Finance code https://bcxbasiccoders.com/mrbcx_samples/Finance.zip
« Reply #2 on: October 29, 2020, 05:47:56 PM »
Hello Mr. BCX,

I'm trying to recompile your source code from the Finance examples with PellesC version 10. I left the source code unchanged.
All the code compiles well, but running the exe files give a $NAN . Your originial exe files give the correct results.

Peter

Peter,

The INPUT statement now requires the variable type symbol to be included. 

For example, in FV.bas

change

INPUT " Monthly payments ...... " , Payment           
INPUT " Annual Interest Rate .. " , Interest               
INPUT " Present Values ........ " , PresentValue           
INPUT " Number of Periods ..... " , NumPeriods

to

INPUT " Monthly payments ...... " , Payment#                
INPUT " Annual Interest Rate .. " , Interest#                
INPUT " Present Values ........ " , PresentValue#            
INPUT " Number of Periods ..... " , NumPeriods#

I have updated:

https://bcxbasiccoders.com/mrbcx_samples/Finance.zip

Peter1956nl

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Finance code https://bcxbasiccoders.com/mrbcx_samples/Finance.zip
« Reply #3 on: October 30, 2020, 08:35:08 AM »
Thanks Mr. BCX :)

Peter