[m-users.] Trying to create a simple bank account monitoring system with IO

Dirk Ziegemeyer dirk at ziegemeyer.de
Fri Nov 10 18:44:44 AEDT 2017


Hi Zeldangit,

how do you want to store your database with bank accounts?

You could use a text file with Mercury terms and then read this text file with io.read.

Your text file would have this content:
account(bar, 1, 123.45).
account(foo, 2, 5678.90).
…

The target data structure might be a map with account number as key.

You can then search the map by providing the account number.

Dirk


> Am 09.11.2017 um 20:05 schrieb zeldangit <zeldangit at gmail.com>:
> 
> Hello,
> 
> I am sorry to bother you guys again but I am a bit stuck. I have this code in which I am trying to create a simple system for creating a bank account and checking the current balance. Right now I am stuck on the most simple IO stuff. In particular, I know I should be using a 'maybe' but I am unsure of how to do it. Any help would be much appreciated.
> 
> Thank you for taking the time to read this.
> _______________________________________________
> users mailing list
> users at lists.mercurylang.org
> https://lists.mercurylang.org/listinfo/users



More information about the users mailing list