Re: [nsbasic-ce] Expected End Of Statement
Please look at the Language Reference. The Next statement should not have anything after it. > > >Hello, > I'm using this code here to do a loop, and(as I think) do something >like a exponential: >Sub btElev_Click > For iLoop = 0 To number2 > result = number1 * number1 > Next iLoop >End Sub >But when I tried to execute this code, I got this error: >Microsoft VBScript compilation error - line 155, char 8 >Expected end of statement >What I need to do? > >Best Regards, > Nathan Paulino Campos > > > -- You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb...@googlegroups.com. To unsubscribe from this group, send email to nsb-ce+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en.
[nsbasic-ce] Expected End Of Statement
Hello, I'm using this code here to do a loop, and(as I think) do something like a exponential: Sub btElev_ClickFor iLoop = 0 To number2 result = number1 * number1Next iLoop End Sub But when I tried to execute this code, I got this error: Microsoft VBScript compilation error - line 155, char 8 Expected end of statement What I need to do? Best Regards, Nathan Paulino Campos -- You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb...@googlegroups.com. To unsubscribe from this group, send email to nsb-ce+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en.
[nsbasic-ce] Re: Expected End Of Statement
Oh! This is just because I used too much VB. Thanks very reminding me. --- In nsbasic-ce@yahoogroups.com, "George Henne" wrote: > > Please look at the Language Reference. > > The Next statement should not have anything after it. > > > > > > >Hello, > > I'm using this code here to do a loop, and(as I think) do something > >like a exponential: > >Sub btElev_Click > > For iLoop = 0 To number2 > > result = number1 * number1 > > Next iLoop > >End Sub > >But when I tried to execute this code, I got this error: > >Microsoft VBScript compilation error - line 155, char 8 > >Expected end of statement > >What I need to do? > > > >Best Regards, > > Nathan Paulino Campos > > > > > > > -- You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb...@googlegroups.com. To unsubscribe from this group, send email to nsb-ce+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en.
[nsbasic-ce] Re: Convert String To Integer And Vice-Versa
Thanks veery much! All that I need to do is CStr(result) :) --- In nsbasic-ce@yahoogroups.com, "George Henne" wrote: > > Have you checked the Language Reference? > > Please see "Conversions". > > The answer is also in Tutorial 3, which I have referred you to already. > > >But how to convert the integer to a string that I could use with the > >txtVisor.Text? > > > >PS: Remember that I need to convert from string to integer and to string. > > > >--- In nsbasic-ce@yahoogroups.com, "Woody & Yuni Ho" wrote: > >> > >> Sorry...keep thinking vb. > >> > >> Dim a > >> > >> A=cint(txtstr) > >> > >> > >> Woody wizard at large(I'm in shape. Round is a shape) > >> Connected by MOTOBLURâ?¢ on T-Mobile > >> > >> -Original message- > >> From: George Henne > >> To: "nsbasic-ce@yahoogroups.com" > >> Sent: Wed, Jun 9, 2010 18:42:08 PDT > >> Subject: Re: [nsbasic-ce] Convert String To Integer And Vice-Versa > >> > >> Ok, but no 'as int'. > >> > >> Please excuse any typos. This message is sent from my mobile device. > >> > >> On Jun 9, 2010, at 9:37 PM, "Woody & Yuni Ho" wrote: > >> > >> > > >> > > >> > Dim a as int > >> > A = cint(txtstr) > >> > > >> > Woody > >> > > >> > > >> > Woody wizard at large(I'm in shape. Round is a shape) > >> > Connected by MOTOBLURâ?¢ on T-Mobile > >> > > >> > -Original message- > >> > From: Nathan > >> > To: nsbasic-ce@yahoogroups.com > >> > Sent: Wed, Jun 9, 2010 18:13:04 PDT > >> > Subject: [nsbasic-ce] Convert String To Integer And Vice-Versa > >> > > >> > Hello, > >> > I'm building a calculator application, and I have a Form, with a > >TextBox called txtVisor, that has the property NumbersOnly = true. I > >want to get the content of it(that I already know: txtVisor.Text) and > >convert it into a Integer, to do multiply it by 12, then convert the > >result into a String to set the txtVisor.Text as the result of the > >operation. How could I do this? > >> > > >> > Best Regards, > >> > Nathan Paulino Campos > >> > > >> > > >> > > >> > > >> > > > > > > > > > > > > > >Yahoo! Groups Links > > > > > > > -- You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb...@googlegroups.com. To unsubscribe from this group, send email to nsb-ce+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en.
Re: [nsbasic-ce] Re: Convert String To Integer And Vice-Versa
Have you checked the Language Reference? Please see "Conversions". The answer is also in Tutorial 3, which I have referred you to already. >But how to convert the integer to a string that I could use with the >txtVisor.Text? > >PS: Remember that I need to convert from string to integer and to string. > >--- In nsbasic-ce@yahoogroups.com, "Woody & Yuni Ho" wrote: >> >> Sorry...keep thinking vb. >> >> Dim a >> >> A=cint(txtstr) >> >> >> Woody wizard at large(I'm in shape. Round is a shape) >> Connected by MOTOBLURâ?¢ on T-Mobile >> >> -Original message- >> From: George Henne >> To: "nsbasic-ce@yahoogroups.com" >> Sent: Wed, Jun 9, 2010 18:42:08 PDT >> Subject: Re: [nsbasic-ce] Convert String To Integer And Vice-Versa >> >> Ok, but no 'as int'. >> >> Please excuse any typos. This message is sent from my mobile device. >> >> On Jun 9, 2010, at 9:37 PM, "Woody & Yuni Ho" wrote: >> >> > >> > >> > Dim a as int >> > A = cint(txtstr) >> > >> > Woody >> > >> > >> > Woody wizard at large(I'm in shape. Round is a shape) >> > Connected by MOTOBLURâ?¢ on T-Mobile >> > >> > -Original message- >> > From: Nathan >> > To: nsbasic-ce@yahoogroups.com >> > Sent: Wed, Jun 9, 2010 18:13:04 PDT >> > Subject: [nsbasic-ce] Convert String To Integer And Vice-Versa >> > >> > Hello, >> > I'm building a calculator application, and I have a Form, with a >TextBox called txtVisor, that has the property NumbersOnly = true. I >want to get the content of it(that I already know: txtVisor.Text) and >convert it into a Integer, to do multiply it by 12, then convert the >result into a String to set the txtVisor.Text as the result of the >operation. How could I do this? >> > >> > Best Regards, >> > Nathan Paulino Campos >> > >> > >> > >> > >> > > > > > > >Yahoo! Groups Links > > > -- You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb...@googlegroups.com. To unsubscribe from this group, send email to nsb-ce+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en.
[nsbasic-ce] Re: Convert String To Integer And Vice-Versa
But how to convert the integer to a string that I could use with the txtVisor.Text? PS: Remember that I need to convert from string to integer and to string. --- In nsbasic-ce@yahoogroups.com, "Woody & Yuni Ho" wrote: > > Sorry...keep thinking vb. > > Dim a > > A=cint(txtstr) > > > Woody wizard at large(I'm in shape. Round is a shape) > Connected by MOTOBLURâ„¢ on T-Mobile > > -Original message- > From: George Henne > To: "nsbasic-ce@yahoogroups.com" > Sent: Wed, Jun 9, 2010 18:42:08 PDT > Subject: Re: [nsbasic-ce] Convert String To Integer And Vice-Versa > > Ok, but no 'as int'. > > Please excuse any typos. This message is sent from my mobile device. > > On Jun 9, 2010, at 9:37 PM, "Woody & Yuni Ho" wrote: > > > > > > > Dim a as int > > A = cint(txtstr) > > > > Woody > > > > > > Woody wizard at large(I'm in shape. Round is a shape) > > Connected by MOTOBLURâ„¢ on T-Mobile > > > > -Original message- > > From: Nathan > > To: nsbasic-ce@yahoogroups.com > > Sent: Wed, Jun 9, 2010 18:13:04 PDT > > Subject: [nsbasic-ce] Convert String To Integer And Vice-Versa > > > > Hello, > > I'm building a calculator application, and I have a Form, with a TextBox > > called txtVisor, that has the property NumbersOnly = true. I want to get > > the content of it(that I already know: txtVisor.Text) and convert it into a > > Integer, to do multiply it by 12, then convert the result into a String to > > set the txtVisor.Text as the result of the operation. How could I do this? > > > > Best Regards, > > Nathan Paulino Campos > > > > > > > > > -- You received this message because you are subscribed to the Google Groups "nsb-ce" group. To post to this group, send email to nsb...@googlegroups.com. To unsubscribe from this group, send email to nsb-ce+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/nsb-ce?hl=en.