Retrieving specific digits of a variable value

Hi guys,

I just had a quick question.


Say I have the user enter a value for a variable, x.

How would i pull a specific digit from it

So if the value put in by the user is 23, it will assign 3 to the variable.

Or if he enters 234619 it will take the 9 and assign it to x.

Thanks in advance.



Answer this question

Retrieving specific digits of a variable value

  • Thomas Holmgren

    <SoheilsX@discussions.microsoft.com> wrote in message
    news:d5285a95-130a-4d67-a41d-a69b12f92463@discussions.microsoft.com
    > Say I have the user enter a value for a variable, x.
    >
    > How would i pull a specific digit from it
    >
    > So if the value put in by the user is 23, it will assign 3 to the
    > variable.
    >
    > Or if he enters 234619 it will take the 9 and assign it to x.
    x % 10
    --
    With best wishes,
        Igor Tandetnik

  • Retrieving specific digits of a variable value