Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

Please Very Urgent: needs help to convert "variable" to a number

 [1/4] from: akram:bmi:my at: 17-Nov-2005 18:55


Dear Rebol Expert, I'm sorry, I'm a newbie and not proficiently good in programming. Could someone please help me to fix the problem or show me the way to solve it. I'm actually try to communicate two master slave Pan tilt machines with rebol script. The question is how I want to convert the 'angle' variable to a number, then add 10, and then convert back to a string to send to the machine. The script as below; insert d30 "GetPan" string! angle: first d30 string! ptupan: clear "" append ptupan "dopan " append ptupan angle print ptupan insert ptu ptupan Thanks in advance for the help and I do really appreciate it. Regards, Akram

 [2/4] from: lmecir::mbox::vol::cz at: 17-Nov-2005 12:03


Akram napsal(a):
>Dear Rebol Expert, >I'm sorry, I'm a newbie and not proficiently good in programming. Could
<<quoted lines omitted: 13>>
>Regards, >Akram
Convert a string to a number: string: "1.15" number: load string another option: number: to decimal! string convert a number to a string: mold number another option: form number HTH

 [3/4] from: akram::bmi::edu::my at: 18-Nov-2005 2:41


Dear Ladislav Mecir, Thanks so much, I can see that. After converting a string to a number, how to add "1.15" with 10 and then convert a new number with a string. Sorry for the question. Regards, Akram ----- Original Message ----- From: "Ladislav Mecir" <lmecir-mbox.vol.cz> To: <rebolist-rebol.com> Sent: Thursday, November 17, 2005 7:03 PM Subject: [REBOL] Re: Please Very Urgent: needs help to convert "variable" to a number

 [4/4] from: tom::conlin::gmail::com at: 17-Nov-2005 10:50


to-string 10 + load "1.15" On 11/17/05, Akram <akram-bmi.edu.my> wrote:
> Dear Ladislav Mecir, > Thanks so much, I can see that. After converting a string to a number, how
<<quoted lines omitted: 64>>
> To unsubscribe from the list, just send an email to > lists at rebol.com <http://rebol.com> with unsubscribe as the subject.
-- ... nice weather eh

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted