Do you have a question? Post it now! No Registration Necessary
- bob prohaska
January 1, 2021, 8:53 pm

Just tried using a couple of USB card adapters with my 8GB Pi4.
Both cause immediate loss of USB hard disk access. Unplugging
the offending adapter does not restore normal operation. Power
cycling puts matters right without apparent ill effect.
Doesn't seem to matter if there's a card in the adapter or not.
The USB3-Sata adapter is a Sabrent EC-UASP. It uses the UAS
driver and hasn't caused any obvious problems on its own.
Anybody seen this, or have any idea what's going on? The card
adapters are fairly generic. Both are USB3, both have been used
before, but only in USB2 ports on Pi3's. One is no-name large-
and micro-SD only, the other is a UGreen card reader supporting TF,
SD, CF and MS cards. The slot labeled TF is the one I used with
microSD cards, didn't notice the "TF" marking till just now.
Thanks for reading!
bob prohaska
Both cause immediate loss of USB hard disk access. Unplugging
the offending adapter does not restore normal operation. Power
cycling puts matters right without apparent ill effect.
Doesn't seem to matter if there's a card in the adapter or not.
The USB3-Sata adapter is a Sabrent EC-UASP. It uses the UAS
driver and hasn't caused any obvious problems on its own.
Anybody seen this, or have any idea what's going on? The card
adapters are fairly generic. Both are USB3, both have been used
before, but only in USB2 ports on Pi3's. One is no-name large-
and micro-SD only, the other is a UGreen card reader supporting TF,
SD, CF and MS cards. The slot labeled TF is the one I used with
microSD cards, didn't notice the "TF" marking till just now.
Thanks for reading!
bob prohaska

Re: USB card adapters crash Pi4
On Fri, 01 Jan 2021 23:32:43 +0000, Nikolaj Lazic wrote:

From your description it sounds as if you're booting with the adapters
disconnected and the hangup occurs when one or both are connected to the
Pi. Is that what happened?
Do they work correctly when used together on another computer?
Have you got a multimeter, osscilloscope or any other way to check the
Pi's supply voltage?
-------
I tend to keep a Pi power cable modified so I can measure the voltage
across it. I run the cable through a small plastic box with terminals on
the lid, the terminals are type used on oscilloscopes or multimeters for
connecting test probes. These are worth using because they're difficult
to short accidentally. The terminals on the box are connected to the red
and black wires in the power cable. So that putting a multimeter or
'scope across them lets you monitor the supply voltage going into the Pi.
I sometimes put two terminals in series on the red cable with an on/off
switch on the bit of wire between the 'red' terminals: this makes current
measurement easy: turn the switch off and connect a meter on the two 'red
terminals to measure current. Don't wanna measure current? disconnect
meter from red terminals and turn the switch on. You mightn't use this
gadget very often, but boy is it useful to have one when you suddenly
need to check voltage or current in a USB terminated cable.
Farnell, Conrad and similar outfits sell suitable boxes and terminals as
well as soldering irons and multimeters

From your description it sounds as if you're booting with the adapters
disconnected and the hangup occurs when one or both are connected to the
Pi. Is that what happened?
Do they work correctly when used together on another computer?
Have you got a multimeter, osscilloscope or any other way to check the
Pi's supply voltage?
-------
I tend to keep a Pi power cable modified so I can measure the voltage
across it. I run the cable through a small plastic box with terminals on
the lid, the terminals are type used on oscilloscopes or multimeters for
connecting test probes. These are worth using because they're difficult
to short accidentally. The terminals on the box are connected to the red
and black wires in the power cable. So that putting a multimeter or
'scope across them lets you monitor the supply voltage going into the Pi.
I sometimes put two terminals in series on the red cable with an on/off
switch on the bit of wire between the 'red' terminals: this makes current
measurement easy: turn the switch off and connect a meter on the two 'red
terminals to measure current. Don't wanna measure current? disconnect
meter from red terminals and turn the switch on. You mightn't use this
gadget very often, but boy is it useful to have one when you suddenly
need to check voltage or current in a USB terminated cable.
Farnell, Conrad and similar outfits sell suitable boxes and terminals as
well as soldering irons and multimeters
--
--
Martin | martin at
--
Martin | martin at
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4

One adapter at a time, yes.

They did when plugged into Pi3's, both under FreeBSD and RaspiOS

It never crossed my mind that power might be an issue.
The power supply is a 3.5 amp unit from CanaKit. I suppose it's
possible I'm on the edge, but you'd think that would cause boot
troubles. I'll cobble up some test leads and check. No 'scope,
alas, but I do have a voltmeter. That limits the utility of
the measurement for transients. Hard to believe the puny little
adapter could make trouble while spinning up the disk is ok.
But it wouldn't be the first power supply to take sick on me.

My habit has been to probe the GPIO pins. I hope the problem doesn't
become common enough to warrant a breakout box. Still it's a good idea.
Thanks for writing!
bob prohaska

Re: USB card adapters crash Pi4
On Sat, 2 Jan 2021 00:52:59 -0000 (UTC), Martin Gregorie wrote:

Or get one of the in line USB voltage and current meters. There are
loads out there of no doubt variable quality. I've a KEX KCX-017 does
the job (up to 3.5 A) and is accurate enough. Display shows V (to 10
mV resolution), A (1 mA resolution) and mAHr up to 20 AHr (less 1
mAHr).

Or get one of the in line USB voltage and current meters. There are
loads out there of no doubt variable quality. I've a KEX KCX-017 does
the job (up to 3.5 A) and is accurate enough. Display shows V (to 10
mV resolution), A (1 mA resolution) and mAHr up to 20 AHr (less 1
mAHr).
--
Cheers
Dave.
Cheers
Dave.

Re: USB card adapters crash Pi4
On Sat, 02 Jan 2021 09:49:46 +0000, Dave Liquorice wrote:

That makes sense - I didn't know these are available, but should have
guessed. The only disadvantage would seem to be that you'll end up with a
collection on different adapter cables since almost all of them seem to
have just USB-C connections.

Like so many Chinese things, Amazon currently has that one marked as
'unavailable', don't know when we'll have more.
Dunno why their manufacturers persist in doing that: in makes them look
like fly-by-night chancers, but maybe that's exactly what they are.

That makes sense - I didn't know these are available, but should have
guessed. The only disadvantage would seem to be that you'll end up with a
collection on different adapter cables since almost all of them seem to
have just USB-C connections.

Like so many Chinese things, Amazon currently has that one marked as
'unavailable', don't know when we'll have more.
Dunno why their manufacturers persist in doing that: in makes them look
like fly-by-night chancers, but maybe that's exactly what they are.
--
--
Martin | martin at
--
Martin | martin at
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4

Belated thought: I wonder how many of these nice toys, many of which
which seem to have just one short production run, are actually final year
projects for electronic design graduates at Chinese technical
universities.
--
--
Martin | martin at
--
Martin | martin at
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4
On a sunny day (Sat, 2 Jan 2021 12:51:35 -0000 (UTC)) it happened Martin

Most AFAIK (the stuff I bought) are just based on chip manufacturer application notes.
If you look at the chip number and locate the data sheet with google you likely find a circuit diagram :-)
To measure DC without breaking any wires I have a Voltcraft VC-330 (google) AC / DC clamp on meter.
Maybe slice an existing USB cable open, find the +5 V wire, clamp it on, measure it, tape it closed (have not tried it on USB).
It is a useful universal thing that you can use for anything like for example
measuring stuff in your car or whatever, without disconnecting or cutting wires etc.
I would not buy something specialized for just USB.

Most AFAIK (the stuff I bought) are just based on chip manufacturer application notes.
If you look at the chip number and locate the data sheet with google you likely find a circuit diagram :-)
To measure DC without breaking any wires I have a Voltcraft VC-330 (google) AC / DC clamp on meter.
Maybe slice an existing USB cable open, find the +5 V wire, clamp it on, measure it, tape it closed (have not tried it on USB).
It is a useful universal thing that you can use for anything like for example
measuring stuff in your car or whatever, without disconnecting or cutting wires etc.
I would not buy something specialized for just USB.

Re: USB card adapters crash Pi4
On Sat, 02 Jan 2021 13:23:17 +0000, Jan Panteltje wrote:

Same here, but then I have an oscilloscope and at least three pocket-size
multimeters, each is part of a different toolkit for the convenience of
having a grabbit-and-go box for different purposes, e.g. model flying and
soaring, and I've already built the aforementioned breakout boxes for USB
and other connector sets.

Same here, but then I have an oscilloscope and at least three pocket-size
multimeters, each is part of a different toolkit for the convenience of
having a grabbit-and-go box for different purposes, e.g. model flying and
soaring, and I've already built the aforementioned breakout boxes for USB
and other connector sets.
--
--
Martin | martin at
--
Martin | martin at
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4
On a sunny day (Sat, 2 Jan 2021 14:52:38 -0000 (UTC)) it happened Martin

Yes, Ok.
I have a like a complete lab with all sort of electronics,
never seen the need to measure an USB cable,
a dead short you can test with a multi-meter.
Model flying I did too, from 31 Dec last year in the EU you need a drone license...
http://panteltje.com/panteltje/quadcopter/index.html
have not got the license yet, so my fireworks (also forbidden now) was playing with a blue power laser 2 days ago.
I have the movie, but better not show it, shine in the clouds ;-)
World has gone paranoia, if it continuous that way than the next generation will grow up as a bunch of dummies.

Yes, Ok.
I have a like a complete lab with all sort of electronics,
never seen the need to measure an USB cable,
a dead short you can test with a multi-meter.
Model flying I did too, from 31 Dec last year in the EU you need a drone license...
http://panteltje.com/panteltje/quadcopter/index.html
have not got the license yet, so my fireworks (also forbidden now) was playing with a blue power laser 2 days ago.
I have the movie, but better not show it, shine in the clouds ;-)
World has gone paranoia, if it continuous that way than the next generation will grow up as a bunch of dummies.

Re: USB card adapters crash Pi4
On Sat, 02 Jan 2021 17:27:41 +0000, Jan Panteltje wrote:

Depends what you fly - I flew single channel RC for a year or to, then
discovered free flight competition models, sold the RC gear and never
looked back.
No license is needed for free flight if the model weighs less than 250g.
Also lots more exercise than just standing there holding a Tx, especially
if you fly F1A (tow-line launched gliders - the faster you run before
launch the higher it gets after release).

I'd ban those (spoken with my pilot hat on) due to all the brain-dead
idiots who think shining them at aircraft is cool.
Oddly enough, the main use my scope got was checking the battery
condition for my Koster dethermaliser timers: These ran off a stack of
four 50mAh NiCds and were used to bring the model down out of a thermal
at the end a timed competition flight. They do this by putting 500mA
through a solenoid for 10 mS - this releases a catch on the tailplane
which puts the glider into a stable deep stall, turning it into a rigid
parachute so it drops out of the thermal and usually lands without damage.
Looking at the shape of the solenoid pulse was a great way of checking
battery condition. A good, new battery showed a nice bathtub curve- 1.5v
deep with an 8ms flat bottom and a 45 degree recovery slope. As the
battery aged, the flat bottom got shorter and the voltage drop increased,
eventually becoming a 4v deep triangle. I replaced batteries once the
voltage drop exceeded 2.5v - the time I put into designing, building and
adjusting a new model vastly exceeded the cost of a new set of batteries.

Depends what you fly - I flew single channel RC for a year or to, then
discovered free flight competition models, sold the RC gear and never
looked back.
No license is needed for free flight if the model weighs less than 250g.
Also lots more exercise than just standing there holding a Tx, especially
if you fly F1A (tow-line launched gliders - the faster you run before
launch the higher it gets after release).

I'd ban those (spoken with my pilot hat on) due to all the brain-dead
idiots who think shining them at aircraft is cool.
Oddly enough, the main use my scope got was checking the battery
condition for my Koster dethermaliser timers: These ran off a stack of
four 50mAh NiCds and were used to bring the model down out of a thermal
at the end a timed competition flight. They do this by putting 500mA
through a solenoid for 10 mS - this releases a catch on the tailplane
which puts the glider into a stable deep stall, turning it into a rigid
parachute so it drops out of the thermal and usually lands without damage.
Looking at the shape of the solenoid pulse was a great way of checking
battery condition. A good, new battery showed a nice bathtub curve- 1.5v
deep with an 8ms flat bottom and a 45 degree recovery slope. As the
battery aged, the flat bottom got shorter and the voltage drop increased,
eventually becoming a 4v deep triangle. I replaced batteries once the
voltage drop exceeded 2.5v - the time I put into designing, building and
adjusting a new model vastly exceeded the cost of a new set of batteries.
--
--
Martin | martin at
--
Martin | martin at
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4

I think it is: "Unless it has a camera" (most of those do however).

LOL, well I bike a lot...
For me it is all curiosity, seemed interesting to write an auto-pilot
and that works very well.
It can be used for anything from rescue to warfare (drop a bomb).

This is the problem, there is ALWAYS someone who does bad things with things,
did you know you can kill somebody with a fork?
So now we forbid all forks (after the knives that is), same for
so many other things.
It is the wrong way to go about it all.
Also it is money sucking.
I got my radio ham license when it was free, after that now I have to pay like 30 Euro a year,,,
The drone license is not free, and in a few years your drone needs an ID transmitter on the drone AND one on the remote,
so they can find where it is and the whereabout of who controls it.
If Russia did it it would be called ....?
Total control state, revolution is needed, I have the tech, much more than this.
You see people rising up against the total lockdown, big party thing in France I just did read, 2500 people together
in some hall, they chased the police out!

Nice system, nicads (I still have one that works) are a bit from the past these days,
lipos work great for my drone, I tried liion (with power converter) but that does not fly longer.
Then I tried a wire, and sure you can keep the thing in the air indefinitely:
http://panteltje.com/pub/h501s_drone_remote_power_flight_test_1_IMG_6274.JPG
note the thin coax over the fence, I send several hundred volt at 100 kHz, transformed it down at the drone,
the high volts at low current allows for a thin light coax.
Position of the drone using differential GPS is within a few cm stable.
http://panteltje.com/pub/h501s_drone_remote_power_test_ground_control_1_IMG_6276.JPG
with scope :-)
The drone side, the high voltage is transformed down by a ringcore transformer to 7.5 V 10A
the high current rectifier diodes are on heatsinks in the air flow from the propellers:
http://panteltje.com/pub/h501s_drone_remote_power_drone_side_IMG_6278.JPG
Part of the 'lab':
http://panteltje.com/pub/h501s_drone_remote_power_lab_test_IMG_6271.JPG

Designing 'tronics and playing with 'tricety I started at 4 years old,
became my job at some point.
It is fun.

Re: USB card adapters crash Pi4
On Sat, 02 Jan 2021 19:45:37 +0000, Jan Panteltje wrote:

Nope. I've never even heard of cameras on Free flight. They're just
irrelevant because by definition the only control possible on a free
flight model is an RDT: the whole point is that the model can't be
controlled after launch because what a contest is about is the art of
launching into lift and of designing/building trimming the model so it ca
self-centre in the lift patch it was launched into. Scoring is simple: at
the end of a competition the winner is the person with the highest total
flight time.
RDT = radio dethermaliser - pushing the button is an irreversable action
that overrides the onboard timer forcing it to end the flight.
We do carry reverse links though (radio trackers to aid retrieval after a
flight and some carry a GPS which modulates the tracker to send location
information back to the model's flyer. Like the tracker, this just makes
retrieval easier after the flight.
Seems like you might never have seen a free flight model. Look here:
https://www.gregorie.org/freeflight/index.html
and there'a bit on the Koster timer here:
https://www.gregorie.org/freeflight/timers/personal.html

Nope. I've never even heard of cameras on Free flight. They're just
irrelevant because by definition the only control possible on a free
flight model is an RDT: the whole point is that the model can't be
controlled after launch because what a contest is about is the art of
launching into lift and of designing/building trimming the model so it ca
self-centre in the lift patch it was launched into. Scoring is simple: at
the end of a competition the winner is the person with the highest total
flight time.
RDT = radio dethermaliser - pushing the button is an irreversable action
that overrides the onboard timer forcing it to end the flight.
We do carry reverse links though (radio trackers to aid retrieval after a
flight and some carry a GPS which modulates the tracker to send location
information back to the model's flyer. Like the tracker, this just makes
retrieval easier after the flight.
Seems like you might never have seen a free flight model. Look here:
https://www.gregorie.org/freeflight/index.html
and there'a bit on the Koster timer here:
https://www.gregorie.org/freeflight/timers/personal.html
--
--
Martin | martin at
--
Martin | martin at
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4
On a sunny day (Sat, 2 Jan 2021 20:41:05 -0000 (UTC)) it happened Martin

I have no experience with 'free flight' other than folding paper airplanes....
Cameras weight next to nothing and can record automatically to some microSDcard...
would be nice to get an aerial view?

Yes,
Nice, but being an electronics freak so to speak I want power and control.
But free flight models seem a great way to learn about aerodynamics.
Not much of a competition person here, just experimenting. make my own rules
set my own targets.

Nice, for those days electronics, used the 555 myself in industry...
These days I just program a Microchip PIC controller in asm, set values via serial link before takeoff,
like for the air text:
http://panteltje.com/panteltje/quadcopter/hsign.html
HUD display with on screen GPS and power:
http://panteltje.com/panteltje/quadcopter/hud.html
Auto pilot controlling drone and dropping load:
https://www.youtube.com/watch?v=bI_0mjwlvNw
I do not use a solenoid, but an electric motor with a screw that releases some nuts, this gives more power with heavy loads,
at low peak current.
http://panteltje.com/panteltje/quadcopter/H501S_load_releasy_system_mounting_IMG_6049.JPG
also note the micro-sdcard for the video...
Precise hands free flight to a few cm.
Better get the GPS stuff right, the first experiments needed fast user interaction to prevent it
flying through windows etc...
The 'tronics' is basically very simple.
Programming in asm on PIC micros is fun :-) It (the hardware) does what you tell it to do,
China has demonstrated large groups of drones flying art like formations using something like this tech:
https://www.youtube.com/watch?v=VnTQTm7vNbY

I have no experience with 'free flight' other than folding paper airplanes....
Cameras weight next to nothing and can record automatically to some microSDcard...
would be nice to get an aerial view?

Yes,
Nice, but being an electronics freak so to speak I want power and control.
But free flight models seem a great way to learn about aerodynamics.
Not much of a competition person here, just experimenting. make my own rules
set my own targets.

Nice, for those days electronics, used the 555 myself in industry...
These days I just program a Microchip PIC controller in asm, set values via serial link before takeoff,
like for the air text:
http://panteltje.com/panteltje/quadcopter/hsign.html
HUD display with on screen GPS and power:
http://panteltje.com/panteltje/quadcopter/hud.html
Auto pilot controlling drone and dropping load:
https://www.youtube.com/watch?v=bI_0mjwlvNw
I do not use a solenoid, but an electric motor with a screw that releases some nuts, this gives more power with heavy loads,
at low peak current.
http://panteltje.com/panteltje/quadcopter/H501S_load_releasy_system_mounting_IMG_6049.JPG
also note the micro-sdcard for the video...
Precise hands free flight to a few cm.
Better get the GPS stuff right, the first experiments needed fast user interaction to prevent it
flying through windows etc...
The 'tronics' is basically very simple.
Programming in asm on PIC micros is fun :-) It (the hardware) does what you tell it to do,
China has demonstrated large groups of drones flying art like formations using something like this tech:
https://www.youtube.com/watch?v=VnTQTm7vNbY

Re: USB card adapters crash Pi4

Understood, but as far as models are concerned, I preferred flying
control-line models to RC. For controlled flight I just climb into my
Standard Libelle and take a winch launch: just 35 seconds from first
movement to 450m and cruises at 120 kph.

Yes, that's very true. But, a big benefit of competition flying is that
it gets you out of the house on less than perfect days: no matter how
good or bad, the weather is the same for everybody in the contest.

Yes, that makes sense.

I've got a PICAXE to experiment with, which I quite like apart from its
rather unpleasant unsigned integer BASIC, but I csan live with that. I do
like the built-in device controllers though, especially the servo drivers
- perfect for controlling small BEC-equipped motors and EDF (electric
ducted fan) systems.
--
--
Martin | martin at
--
Martin | martin at
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4
On a sunny day (Sun, 3 Jan 2021 14:39:08 -0000 (UTC)) it happened Martin

Yea I better not go into detail here of my adventures in the F100 Super Sabre..
when I got the order to abort, so many lives at stake...
;-)

Yes, one problem here is that the government decreed the whole area to a no fly zone
for model aircraft.. I am close to Leeuwarden mil airbase.
One reason I do not fly this one:
http://panteltje.com/pub/axion_laser_arrow_IXIMG_0650.JPG
serves more as ornament, wrote a whole lot of stuff for that though.
But it needs space, 160 km/h.

I also wrote the software I use to program the PICs, the hardware is based on the noppp programmer,
just modified it a bit for the modern PICs:
http://panteltje.com/panteltje/pic/jppp18/index.html
uses PC parport, using a PCI card with parport connector in the modern PC..
did many PIC projects, some are on my site:
http://panteltje.com/panteltje/pic/index.html
As to that BASIC: in my view asm is often simpler, indeed the PIC hardware is nice.
I use an asm math library written by someone else, so far 32 bit integer was all I needed,
In asm you do not have to worry about code generation by whatever... compiler ...
Also the PICs give you near zero boot time, near zero power consumption, near zero weight, near zero cost (about 2$ a piece).

Yea I better not go into detail here of my adventures in the F100 Super Sabre..
when I got the order to abort, so many lives at stake...
;-)

Yes, one problem here is that the government decreed the whole area to a no fly zone
for model aircraft.. I am close to Leeuwarden mil airbase.
One reason I do not fly this one:
http://panteltje.com/pub/axion_laser_arrow_IXIMG_0650.JPG
serves more as ornament, wrote a whole lot of stuff for that though.
But it needs space, 160 km/h.

I also wrote the software I use to program the PICs, the hardware is based on the noppp programmer,
just modified it a bit for the modern PICs:
http://panteltje.com/panteltje/pic/jppp18/index.html
uses PC parport, using a PCI card with parport connector in the modern PC..
did many PIC projects, some are on my site:
http://panteltje.com/panteltje/pic/index.html
As to that BASIC: in my view asm is often simpler, indeed the PIC hardware is nice.
I use an asm math library written by someone else, so far 32 bit integer was all I needed,
In asm you do not have to worry about code generation by whatever... compiler ...
Also the PICs give you near zero boot time, near zero power consumption, near zero weight, near zero cost (about 2$ a piece).

Re: USB card adapters crash Pi4

It makes sense, though, depending on your applications.
In 50 years of commercial programming, I can count the
number of times I've used floating point on the fingers
of one hand.
--
/~\ Charlie Gibbs | "Some of you may die,
/~\ Charlie Gibbs | "Some of you may die,
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4
On 03/01/2021 19:15, Charlie Gibbs wrote:

Odd. I use it extensively. Not for money oriented stuff tho

Odd. I use it extensively. Not for money oriented stuff tho
--
New Socialism consists essentially in being seen to have your heart in
the right place whilst your head is in the clouds and your hand is in
New Socialism consists essentially in being seen to have your heart in
the right place whilst your head is in the clouds and your hand is in
We've slightly trimmed the long signature. Click to see the full one.

Re: USB card adapters crash Pi4
On Mon, 04 Jan 2021 03:17:27 +0000, The Natural Philosopher wrote:

Not that odd: in a 30 year IT career (system design, programming,
sysadmin, much of it databases and finance-related systems) I can only
think of one survey analysis program I wrote, in Algol 60, that used
floating point (and that was for a one-off task).
Financial systems never use floating point for accuracy reasons:
consequently integers are used to hold currency amounts: sterling amounts
are held as pence, euros and dollars as cents and the equivalent
convention is used for all other currencies. The only exception I'm aware
of was financial packages written in BASIC for early microcomputers, and
that was only because (a) integers tended to be 16 bits at most and (b)
their PRINT statements often couldn't interpolate a decimal point when
displaying an integer value.
OTOH COBOL was designed from the outset to deal with currency amounts
held as integers:
might look as if its floating point but, the variable would be a 32 bit
signed integer which would be read or written as a string containing the
currency sign, possibly containing comma separators and with a decimal
point separating pounds from pence.
RPG (UGH!) does the same and all modern languages (and assemblers) have
sufficiently powerful number scanning and formatting library functions to
do the same.

Not that odd: in a 30 year IT career (system design, programming,
sysadmin, much of it databases and finance-related systems) I can only
think of one survey analysis program I wrote, in Algol 60, that used
floating point (and that was for a one-off task).
Financial systems never use floating point for accuracy reasons:
consequently integers are used to hold currency amounts: sterling amounts
are held as pence, euros and dollars as cents and the equivalent
convention is used for all other currencies. The only exception I'm aware
of was financial packages written in BASIC for early microcomputers, and
that was only because (a) integers tended to be 16 bits at most and (b)
their PRINT statements often couldn't interpolate a decimal point when
displaying an integer value.
OTOH COBOL was designed from the outset to deal with currency amounts
held as integers:
might look as if its floating point but, the variable would be a 32 bit
signed integer which would be read or written as a string containing the
currency sign, possibly containing comma separators and with a decimal
point separating pounds from pence.
RPG (UGH!) does the same and all modern languages (and assemblers) have
sufficiently powerful number scanning and formatting library functions to
do the same.
--
--
Martin | martin at
--
Martin | martin at
We've slightly trimmed the long signature. Click to see the full one.
Site Timeline
- » Analog to digital converter
- — Next thread in » Raspberry Pi Group
-
- » is it posibe to disable boo tEEPROm in PI4B
- — Previous thread in » Raspberry Pi Group
-
- » Which Rasptank is best?
- — Newest thread in » Raspberry Pi Group
-
- » Подвох
- — The site's Newest Thread. Posted in » Electronic Circuits (Russian)
-