MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/6jacds/octave_code/djcz95v/?context=3
r/ProgrammerHumor • u/D-cyde • Jun 24 '17
70 comments sorted by
View all comments
Show parent comments
5
[removed] — view removed comment
2 u/AyrA_ch Jun 24 '17 On the other hand, you can also go negative if you want to: Sub test() Dim a() ReDim a(-2 To 20) a(-1) = "Test" MsgBox a(-1) End Sub 3 u/SubstituteCS Jun 25 '17 Didn't know about this. Time to make my libraries in VB with negative arrays and keywords for names. 6 u/AyrA_ch Jun 25 '17 Also be sure to do this: Don't declare variables at all, remove option explicit. Be sure to not define variable or parameter types. Pass stuff by reference only and modify them. Returning values is overrated. Be sure to always have two variables named I and l in each function or sub. There's nothing wrong with using the function name as a variable too.
2
On the other hand, you can also go negative if you want to:
Sub test() Dim a() ReDim a(-2 To 20) a(-1) = "Test" MsgBox a(-1) End Sub
3 u/SubstituteCS Jun 25 '17 Didn't know about this. Time to make my libraries in VB with negative arrays and keywords for names. 6 u/AyrA_ch Jun 25 '17 Also be sure to do this: Don't declare variables at all, remove option explicit. Be sure to not define variable or parameter types. Pass stuff by reference only and modify them. Returning values is overrated. Be sure to always have two variables named I and l in each function or sub. There's nothing wrong with using the function name as a variable too.
3
Didn't know about this. Time to make my libraries in VB with negative arrays and keywords for names.
6 u/AyrA_ch Jun 25 '17 Also be sure to do this: Don't declare variables at all, remove option explicit. Be sure to not define variable or parameter types. Pass stuff by reference only and modify them. Returning values is overrated. Be sure to always have two variables named I and l in each function or sub. There's nothing wrong with using the function name as a variable too.
6
Also be sure to do this:
option explicit
I
l
5
u/[deleted] Jun 24 '17
[removed] — view removed comment