Page 1 of 1

Test running parts of a program

Posted: Sat Oct 22, 2011 6:59 pm
by phs
Let's say I want the program to read rows 1-2, and rows 8-9 then I can just put the sign:
'
in front of the rows 2, 3, 4, 5, 6, and 7 to skip these rows
syntax 1
syntax 2
'syntax 3
'syntax 4
'syntax 5
'syntax 6
'syntax 7
syntax 8
syntax 9

Is it possible to use some kind of command that skips all rows between row 3 and 7. That is, something like
syntax 1
syntax 2
' start skipping rows command
syntax 3
syntax 4
syntax 5
syntax 6
syntax 7
' end skipping rows command
syntax 8
syntax 9

This would save some time of putting in lots of
'
if there are many rows that should be skipped.

This would also be useful when test running parts of a program without having to copy parts of the program to another program window.


(Moreover, in order to more easily navigate in a large program, it would be nice to be able to edit the font size, bold/italics/not bold, colors etc for programs, but this part I should maybe have included in the suggestion part of the forum so i put this in parenthesis. It would also be nice with a fast command for running a program closer to where you have your fingers on the keyboard like alt+R. I need to lift up all my fingers from the keyboard to use F10+Enter, Alt+R is quicker and more natural since if you can type, you know where Alt+R is without looking at the keyboard-or maybe this is a luxury problem. I would like to have a command that ALWAYS stops a running program, since I sometimes need to use Crtl+Alt+Del to kill some programs with errors. I would also be convenient if one could just highlight some part of a program text, and then only this part of the program would run. I don't know, maybe there are good reasons for not having these features, but you could at least consider them. This part in parenthesis you do not need to give a reply to, these are only suggestions.)

Re: Test running parts of a program

Posted: Sat Oct 22, 2011 7:57 pm
by EViews Gareth
Highlight lines 3-7, right click and select comment selection (or use ctrl-k).

Options->General Options->Fonts->Text editors, lets you change the font settings of all text editor windows in EViews (including programs).

F1 should stop a program.

Re: Test running parts of a program

Posted: Sun Oct 23, 2011 5:25 pm
by phs
Comment selection is a great command, but the problem is that most people also writes text comments that explains the written code in the middle of the code.

Is it possible to use some kind of command that skips all rows between row 3 and 7. That is, something like:

syntax 1
syntax 2
syntax 3
syntax 4
' let's say that I have some comments about the program in this line
syntax 5
syntax 6
syntax 7
syntax 8
syntax 9

If I highlight lines 3-7 and use 'Comment selection', this will work fine. However, when I want to change back again (uncomment selection) so that it will read all lines again (with no ' ) it will also read the text line where it above says: ' let's say that I have some comments about the program in this line. Therefore, it would be better with a start and stop of skipping lines.

Moreover, when using 'Options->General Options->Fonts->Text editors' this will change ALL the text, not only the single word that I want to highlight, edit, or change.

Anyway, these are only suggestions for version 8, and I can live without them, but they would help. Except for this I think that all of you are doing a great job with EViews.

Re: Test running parts of a program

Posted: Sun Oct 23, 2011 6:44 pm
by EViews Gareth
If that line was commented before you did "comment selection", it will still be commented when you "uncomment selection".