Skip to Content
author's profile photo Former Member
Former Member

Convert Char to float

Hi all,

Am wanting to convert a char value (the infoobject is defined as NUMC) into float in order to perform a calculation in the FOX formula. It would not allow the char value to be stored into a float variable...comes back wz an error message - Types of operands F and <infoobject_numc> do not agree.

Any ways of doing this? I thought about using a function to perform the conversion from char to float format but dont knw if such a function exists on the BI system?

Thanks!

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 08, 2007 at 06:01 AM

    Unfortunately there seems to be no standard command in FOX to perform this operation.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi,

      I sometimes use a local variable of type STRING to pass on values to other data types:

      DATA local type STRING.

      local = A.

      B = local.

      But I'm not sure it will work for you. If not, you can do it with an exit function.

      D

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.