Shop OBEX P1 Docs P2 Docs Learn Events
I want to use numbers — Parallax Forums

I want to use numbers

lfreezelfreeze Posts: 174
edited 2007-09-27 21:04 in Propeller 1
I want to use numbers, I used letters in the example to make the question easier to understand.· here are a few examples of
what I am trying to accomplish

··· variable1:=1
··· variable2:=1
I want variable3 to equial· ·11

·· variable1:=4
·· variable2:=5
I want variable3 to equial 45

Thanks
Larry


Post Edited By Moderator (Chris Savage (Parallax)) : 9/28/2007 2:59:41 PM GMT

Comments

  • SailerManSailerMan Posts: 337
    edited 2007-09-27 18:11
    How about something simple like...

    Variable3=(Variable1*10)+Variable2

    Regards,
    Eric
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-27 18:11
    Please don't start a new thread when your question is a continuation of a previous posting.

    I've already posted a statement that will do what you want.
  • rjo_rjo_ Posts: 1,825
    edited 2007-09-27 18:28
    Larry,

    let's say A = 11 and B is 11

    so 11 * 10 = 110

    110 + 11 = 121... and what you want is 1111 right?

    So, you need to turn the numbers into strings and concantenate them?

    Sorry, I don't know how to do that yet...

    Rich
  • BasilBasil Posts: 380
    edited 2007-09-27 21:04
    See my post in your other thread [noparse]:)[/noparse] Does that help?

    http://forums.parallax.com/forums/default.aspx?f=25&m=219664

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    -Alec

    My our page
Sign In or Register to comment.