I have just started using ViewPort with PropBasic and there are 2 things which I cannot figure out:
1) Is it possible to turn the background colours of the Code Window off, i.e. just have a plain white background?
2) Is it possible to make the Code Window larger and the Info Windows on the left smaller? There does not seem to be a "Drag Handle" to re-size the Code Window horizontally?
Hi Andre,
1- Currently you can not customize the color syntax highlighting.
However, ViewPort makes it very easy to use your own editor. Just open the file in both your own editor and in ViewPort. ViewPort will ask you if you want to "reload file" if you make any changes in your editor. Everything will be preserved, even your position in the file.
2- Yes, you can adjust the size, just mouse to the boundary and drag it.
Hanno
Since I'm a newbie, please forgive me if this has been covered before. I was curious on how to establish local variables for subroutines contained withing the COGs. I recall that in SX/B you could append a "l_" to the var.
Here is a typical example of 2 independent subroutines that need to have variables defined. Since having 6 variables defined (a,b,c,d,e,f,) is wasteful of COG ram, what would be the best practice here to have variable names that save on space but also have meaning within the routine ?
SubRoutine1 SUB
a VAR LONG
b VAR LONG
c VAR LONG
' Some code using these variables
ENDSUB
SubRoutine2 SUB
d VAR LONG
e VAR LONG
f VAR LONG
' Some code using these variables
ENDSUB
I know we could use something like declaring Temp1, Temp2, Temp3 etc outside the 2 routines and then using them within each routine. However, the generic names are meaningless within the context of each routine (I like to give the variable names accurate descriptions based on their role within each routine).
Many thanks
Tony
Tony,
All VARs in PropBasic are global, but you can alias them like this:
a VAR LONG
b VAR a
In the above example both a and b will use the same memory location. So you can create some temp vars, then alias them at the beginning of your subroutines so you can call them something descriptive.
Just a question regarding the Compile (Shift + F8) statistics: The Variables information always shows 2 longs, regardless of how many variables the program has. Is it supposed to show how many variables are used by the program or does it actually show something else?
Program: 3090 longs
Variables: 2 longs << This is always 2
Stack/Free: 5095 longs
I remember downloading PropBasic Ver. 1.30 for Viewport from one of the many threads at some stage having found the post by pure coincidence, but I can't find it again. I had a disk crash and had to restore some backups this afternoon but I lost PropBasic Ver. 1.30 :frown:
Could you perhaps update the first post in this Forum with the latest version of PropBasic?
Comments
1) Is it possible to turn the background colours of the Code Window off, i.e. just have a plain white background?
2) Is it possible to make the Code Window larger and the Info Windows on the left smaller? There does not seem to be a "Drag Handle" to re-size the Code Window horizontally?
1- Currently you can not customize the color syntax highlighting.
However, ViewPort makes it very easy to use your own editor. Just open the file in both your own editor and in ViewPort. ViewPort will ask you if you want to "reload file" if you make any changes in your editor. Everything will be preserved, even your position in the file.
2- Yes, you can adjust the size, just mouse to the boundary and drag it.
Hanno
Thanks for the feedback :-)
Regards
Andre
Tony,
All VARs in PropBasic are global, but you can alias them like this:
In the above example both a and b will use the same memory location. So you can create some temp vars, then alias them at the beginning of your subroutines so you can call them something descriptive.
Bean
Just a question regarding the Compile (Shift + F8) statistics: The Variables information always shows 2 longs, regardless of how many variables the program has. Is it supposed to show how many variables are used by the program or does it actually show something else?
Regards
Andre
I remember downloading PropBasic Ver. 1.30 for Viewport from one of the many threads at some stage having found the post by pure coincidence, but I can't find it again. I had a disk crash and had to restore some backups this afternoon but I lost PropBasic Ver. 1.30 :frown:
Could you perhaps update the first post in this Forum with the latest version of PropBasic?
Regards
Andre
Try here at post 787
http://forums.parallax.com/showthread.php/118611-Download-PropBASIC-here...-00.01.14-July-27-2011?p=1160689&viewfull=1#post1160689