LAE

Welcome to the LAE community!  Please feel free to start a discussion in the discussion tab or join in a conversation.

Discussions

Members

Resources

Events

 View Only
  • 1.  Convert Decimal to Hexadecimal

    Employee
    Posted 04-03-2012 04:08

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: iretzo

    Hi,

    Could you please suggest us how to convert the decimal (numbers) to hexadecimal.
    Is there any command that convert numbers to hexadecimal?

    Thank you in advance,
    Irma Retzio


  • 2.  RE: Convert Decimal to Hexadecimal

    Employee
    Posted 04-03-2012 08:23

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: timonk

    Irma,

    You can use the BRAINScript function "format" to do some basic representation conversions of this type. See your BRAINScript help under the "String" section for this command.

    For example, if I use a static data with the following values:
    num:int
    1
    2
    3
    4
    5
    10
    256
    1024
    53178

    And put that output through a filter node with the following code:
    emit format("%.X", num) as "hex format int", num

    The result is:
    hex format int num
    1 1
    2 2
    3 3
    4 4
    5 5
    A 10
    100 256
    400 1024
    CFBA 53178

    However, the resulting conversion will be a STRING format, not a number.

    Does that help?
    Regards,
    Timon Koufopoulos
    Lavastorm Analytics Support.


  • 3.  RE: Convert Decimal to Hexadecimal

    Employee
    Posted 04-16-2012 16:08

    Note: This was originally posted by an inactive account. Content was preserved by moving under an admin account.

    Originally posted by: Adam Williamson

    Hi Iretzo,

    I think this post might have what you ware looking for.
    http://community.lavastorm.com/showt...hlight=decimal

    Regards,
    Adam