×
The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.
Your code received MCH1210 so which receiver was to small?
Perhaps trying to stuff 9 significant digits (9,0) into a
field capable of holding only 7 (9,2) is asking a bit much?
Actually, I wasn't stuffing, I was packing. That's why I declared the
parameters as packed.
Well, the system cannot place 9 significant digits into a field with only 7.
Even if it "packs" it (which has no bearing on its limits anyway).
The point that Simon is trying to make, is that both CONST and VALUE will
cause a conversion from your input data type to your procedure's required
data type. In this case, you have a field that can hold a value of
plus/minus 999 million and change. Your procedure has a limit of plus/minus
9 million and change. Your usage of CONST made the compiler accept the
difference, providing a temporary (same size as specified in the proto) that
would be passed to the procedure. But it could not stuff/pack/place the
value into the temporary because the temporary was too small.
If you want to be "protected" from such mistakes, remove the CONST (and
don't be tempted to replace it with VALUE). But then you will lose a
different kind of protection.
Dennis Lovelady
http://www.linkedin.com/in/dennislovelady
--
"People are usually more convinced by reasons they discovered themselves
than by those found by others."
-- Blaise Pascal
As an Amazon Associate we earn from qualifying purchases.