Jump to content

Bug or Feature?


hfettig

Recommended Posts

I have a string variable, which contains an integer number representing a floating point value with one decimal., e.g. -321 -> -32.1

In order to convert the string to a double variable I use the 'Decimal String To Number' function and divide the result by ten. This works fine if nothing or an Integer constant is wired to the default value. It properly converts -321, 321 and +321.

To avoid the coercion dot at the devision function I wired a double constant to the default value of 'Decimal String To Number'. This changes the output wire to double and the coercion dot disappears. So far so good. However, now only 321 is properly converted -321 and +321 are not converted and the default value is put out.

The same happens for extended, single, and any unsigned integer values wired to the default value.

Granted, I can easily work around the problem, but I wanted to check if anybody has an explanation for this behaviour.

I tried it in 7.1, 7.0, and 6i: same behaviour everywhere. :headbang:

Cheers,

Heiko

Download File:post-1022-1101330789.vi

Link to comment

The names of these functions is not clear.

Fract/Exp String To Number accutally works on Dbl,Sng and Exp. not sure why they have fract in the name.

Decimal String To Number should accually be Decimal String To integer

If you use the Fract/Exp String To Number function instead of the Decimal String To Number

you will get what your lookin for.

post-584-1101753456.png?width=400

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.