I am inclined to closely follow the original Pascal convention
constant declaration
type declaration
function/sub declaration
main:
constant declaration
variable declaration
main code
suffixes have their place in my opinion, for example to distinguish between functions of different result type
but I hate overuse of the var statement, actually, I avoid it's use if at all possible, QB64 doesn't have the var statement but some languages do
var is used to declare a variable type on the fly depending on what type is on the right side
for example: var s="hello"
s would be declared as type string and then assigned the string "hello", but quite often it's impossible to infer the variable type assigned to the variable on the left, for example: var s=some_windows_api(...)
also the fact that it's used anywhere in the code instead of the variable having been declared at the top
<edit> @SpriggsySpriggs , variable suffixes I hate also, when I wrote to "distinguish between functions of different result type" I wasn't thinking of the basic suffixes like $#%&, almost looks like a curse word
constant declaration
type declaration
function/sub declaration
main:
constant declaration
variable declaration
main code
suffixes have their place in my opinion, for example to distinguish between functions of different result type
but I hate overuse of the var statement, actually, I avoid it's use if at all possible, QB64 doesn't have the var statement but some languages do
var is used to declare a variable type on the fly depending on what type is on the right side
for example: var s="hello"
s would be declared as type string and then assigned the string "hello", but quite often it's impossible to infer the variable type assigned to the variable on the left, for example: var s=some_windows_api(...)
also the fact that it's used anywhere in the code instead of the variable having been declared at the top
<edit> @SpriggsySpriggs , variable suffixes I hate also, when I wrote to "distinguish between functions of different result type" I wasn't thinking of the basic suffixes like $#%&, almost looks like a curse word