S SPLatMan Member Licensed User Longtime User Jul 23, 2014 #1 A feature of Visual Basic's editor I find useful is that it "normalises" the spacing on code lines. For example, if I type Code: Copy x=89 the editor automatically inserts spaces to make it Code: Copy x = 89 . This not only makes the program a little neater, but makes it easier to find all cases of assigning a value to x.
A feature of Visual Basic's editor I find useful is that it "normalises" the spacing on code lines. For example, if I type Code: Copy x=89 the editor automatically inserts spaces to make it Code: Copy x = 89 . This not only makes the program a little neater, but makes it easier to find all cases of assigning a value to x.
R RVP Active Member Licensed User Longtime User Jul 30, 2014 #4 I would take it a bit further. A lot of development tools will 'pretty' format for you. So if I put in Code: Copy If x>2 Then They will indent the next series of lines until I type End If Then the indent will move back. This makes it far easier to see if your program flow is what you think it is going to be, as well as just plain makes code easier to read.
I would take it a bit further. A lot of development tools will 'pretty' format for you. So if I put in Code: Copy If x>2 Then They will indent the next series of lines until I type End If Then the indent will move back. This makes it far easier to see if your program flow is what you think it is going to be, as well as just plain makes code easier to read.
ivan.tellez Active Member Licensed User Longtime User Aug 6, 2014 #5 I really love this on vb6 it has LOTS of advantages for example a simple serach of "x=89" it will not find "x= 89" nor "x =89" not even "x = 89" Best practices to code is to allways have "normalized" code, but currently its time consuming and sometimes you forgot to do it in some lines of code. +1
I really love this on vb6 it has LOTS of advantages for example a simple serach of "x=89" it will not find "x= 89" nor "x =89" not even "x = 89" Best practices to code is to allways have "normalized" code, but currently its time consuming and sometimes you forgot to do it in some lines of code. +1
MikeH Well-Known Member Licensed User Longtime User Aug 6, 2014 #6 Yes, I do this manually but it would help if it was automatic. Maybe even having styles whereby you can set your own spacing, rules etc? I wonder if there is a recommended layout for code or do we just do our own thing?
Yes, I do this manually but it would help if it was automatic. Maybe even having styles whereby you can set your own spacing, rules etc? I wonder if there is a recommended layout for code or do we just do our own thing?
T Tom Law Active Member Licensed User Longtime User Aug 7, 2014 #7 Have you tried out the B4a Code Formatter? (search for it on this site).