Hi Doug:
I guess I didn't state my question very clearly so I will try to
explain it a little better
As was mentioned, if you go into the immediate mode by pressing
shift-control-q, you can type the following:
print "hello"
and then press the enter key and the word "hello" will appear on the screen.
However, if you type the above statement and press the numpad enter
key, it will do nothing except go to a new line.
My question is, then, if you typed something like the following:
for i = 1 to 5
print "hello"
next
and pressed numpad enter after each of those three lines, is there any
way to execute them all?
one situation where this might be useful is if you have a Do loop
consisting of about 5 or 6 statements and you would like to test it in
Immediate mode but do not want to have to type them all on the same
line.
I hope this clears it up.
Kevin Huber

On 2/25/11, Doug Geoffray <[email protected]> wrote:
> Kevin,
>
> I'm not sure I'm following.  The normal ENTER key is the only key that
> will execute the line under the cursor.  If you have multi line code
> such as:
>
> a=5
> b=a*25
> print "the result is " & b
>
> You can just type each line and press the normal enter and it works.
> But if you have something like:
>
> a=0
> for i=1 to 10
> a=a+i
> next
> print "the result is " & a
>
> Which adds the numbers from 1 to 10 you can't do this because the for
> and next can't be executed one line at a time.  So in this case you
> could just put everything on one line such as:
>
> a=0 : for i=1 to 10 : a=a+i : next : print "the result is " & a
>
> This would execute the entire routine.  You can define subs or functions
> with this as well.  For example:
>
> Sub PrintIt(a) : print a : End Sub
>
> If you hit the normal Enter on the line above then you can just do:
>
> PrintIt "this is a test"
>
> and it will execute the sub.
>
> Doug
>
> On 2/25/2011 4:58 PM, Kevin Huber wrote:
>> Hi:
>> If, as suggest in this thread, that the numpad enter key could be used
>> to test a large block of code,  how do you then execute a multiline
>> block of code that you have just typed using the numpad enter key to
>> insert line breaks at the end of each line?
>> Kevin Huber
>>     2/21/11, Stephen Clower<[email protected]>  wrote:
>>> Donovan,
>>>
>>> Was your numlock off?
>>>
>>> Steve
>>>
>>>
>>>
>>> On 2/21/2011 2:58 AM, Donovan Osborn wrote:
>>>> Hi, This is such a small problem I found, that I feel a bit foolish for
>>>> writing about it.
>>>>
>>>> I don't know if this is just happening on my system or if this is a bug
>>>> with the App. So I thoug I would post it and let other people try it to
>>>> see.
>>>> If you type
>>>> Print 1+2
>>>> and hit enter you get three.
>>>> However if you type that same command and hit enter on the numpad, you
>>>> get nothing.
>>>> At least, I don't.
>>>>
>>>> Regards,
>>>> Donovan Osborn
>>>> Senior supervisor of sitting around my house, reading audiobooks.
>>> --
>>> Stephen Clower
>>> Product support specialist
>>> GW Micro, Inc. * 725 Airport North Office Park, Fort Wayne, IN 46825
>>> 260-489-3671 * gwmicro.com
>>>
>

Reply via email to