Hi! On 2024-03-27 08:43:25, Segher Boessenkool wrote: > Hi! > > On Wed, Mar 27, 2024 at 01:41:27AM -0400, Kautuk Consul wrote: > > -\ read sector to array "block" > > -: read-sector ( sector-number -- ) > > +\ read sector to array "block" and return actual bytes read > > +: read-sector-ret ( sector-number -- actual-bytes ) > > What does "-ret" mean? The name could be clearer. > > Why factor it like this, anyway? Shouldn't "read" always read exactly > the number of bytes it is asked to? So, "read-sector" should always > read exactly one sector, never more, never less. Okay I just thought to return the bytes actually read from that 1 sector so that I could do some checking in the subroutines calling read-sector. > > If an exception happens you can (should!) throw an exception. Which > you can then catch at a pretty high level. Ah, correct. Thanks for the suggestion! I think I will now try to throw an exception from read-sector if all the code-paths imply that a "catch" is in progress. I will try to make some change like this and send out a v4 whenever I have time. > > > Segher