[Pharo-users] Re: uFFI: Calling conventions?

2021-08-30 Thread Guillermo Polito
Hi egarrulo, > El 27 ago 2021, a las 18:50, egarrulo escribió: > > >> Yesterday we have implemented the image side part in P10 to correctly >honour the calling convention. > > Does this imply that uFFI doesn't work correctly on current images? > Because uFFI should have been available since

[Pharo-users] Re: The ideal font for Pharo

2021-08-30 Thread Guillermo Polito
Hi tau, Thanks for it, I’ll check it :) > El 26 ago 2021, a las 1:17, tau escribió: > > I've been bothered by the assignement operator (:=) and the way the colon and > the equal sign aren't verticaly aligned when coding in Pharo. So I began a > quest to find a pharo-friendly font were the col

[Pharo-users] Silly question about storing and displaying currency amounts?

2021-08-30 Thread David Pennington
Hi everyone. I have a little bank analysis package for my own use but having trouble displaying and storing amounts. I parse out a CSV file from the bank and convert the amounts from text to ScaledDecimal. I then store these into a STON file, which converts them back to text. I then read them in

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread Sven Van Caekenberghe
David, > On 30 Aug 2021, at 14:02, David Pennington wrote: > > Hi everyone. I have a little bank analysis package for my own use but having > trouble displaying and storing amounts. I parse out a CSV file from the bank > and convert the amounts from text to ScaledDecimal. I then store these in

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread Esteban Lorenzano
hi, some time ago there was a "money" package around, that basically had a Currency type that internally stored values as integers (like, 42.0 was becoming 4200). This had some advantages to make this kind of calculus (also, it has the "other" advantage of making you believe that you have a lot

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread jtuc...@objektfabrik.de
Hi Sven, I just tried 46.79 asScaledDecimal and 46.79 asScaledDecimal: 2 in both VAST and Pharo and see quite different results. In VAST, not providing a scale returns 46.79, but with a scale of 14 (46.79s14). But it is still 46.79. What's good is that the results of "asScaledDecimal: 2" yie

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread Sabine Manaa
http://smalltalkhub.com/pdebruic/Money/index.html Am Mo., 30. Aug. 2021 um 14:51 Uhr schrieb jtuc...@objektfabrik.de < jtuc...@objektfabrik.de>: > Hi Sven, > > > I just tried 46.79 asScaledDecimal and 46.79 asScaledDecimal: 2 in both > VAST and Pharo and see quite different results. > In VAST,

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread David Pennington
I come from a currency trader background and way back in 1983, I was dealing with this in North Star Basic and then UCSD Pascal and into VisualSmalltalk (remember that?) so I have some history here. Trouble is, at 76, my little grey cells are letting me down bit. Excuses over. I will go back in

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread Esteban Maringolo
I was recently bitten by this wrong "scaled decimal expectation", in which what I thought was wrong it actually wasn't, or I can't tell whether it was. I would expect that a scaled decimal would be something like what Esteban L. suggests, an integer where you just move the decimal point for printi

[Pharo-users] Re: Silly question about storing and displaying currency amounts?

2021-08-30 Thread Richard O'Keefe
Ah, you have run into the insufficiently well known "ScaledDecimal looks like what you need but isn't". In VisualAge, you have a data type that is basically a reflection of iBM mainframe "packed decimal" format, and perfectly suits the needs of an SQL or COBOL interface. It gives you round-trippi