G
gnuarm.del...@gmail.com
Guest
I never realized that if you use characters to enumerate a type, when you use the \'image attribute on it you get the apostrophes along with the character!
type Pixel_t is (\'_\', \'@\');
function pixel (Data : natural) return string is
variable temp : string (1 to 3);
begin
temp := Pixel_t\'image(Pixel_t\'Val(Data));
report \"Pixel - temp = \"\"\" & temp & \"\"\"\";
results in
NOTE : Pixel - temp = \"\'_\'\"
Am I the only one surprised by this?
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209
type Pixel_t is (\'_\', \'@\');
function pixel (Data : natural) return string is
variable temp : string (1 to 3);
begin
temp := Pixel_t\'image(Pixel_t\'Val(Data));
report \"Pixel - temp = \"\"\" & temp & \"\"\"\";
results in
NOTE : Pixel - temp = \"\'_\'\"
Am I the only one surprised by this?
--
Rick C.
- Get 1,000 miles of free Supercharging
- Tesla referral code - https://ts.la/richard11209