name ‘times’ is used prior to global declaration – But IT IS declared

The global declaration is when you declare that times is global def timeit(): global times # <- global declaration # … If a variable is declared global, it can’t be used before the declaration. In this case, I don’t think you need the declaration at all, because you’re not assigning to times, just modifying it.

Does C have One Definition Rule like C++?

I think what you’re looking for is chapter ยง6.2.7 from the C11 standard, Compatible type and composite type, (emphasis mine) All declarations that refer to the same object or function shall have compatible type; otherwise, the behavior is undefined. and related to compatible type, Two types have compatible type if their types are the same. … Read more

Can I simultaneously declare and assign a variable in VBA?

There is no shorthand in VBA unfortunately, The closest you will get is a purely visual thing using the : continuation character if you want it on one line for readability; Dim clientToTest As String: clientToTest = clientsToTest(i) Dim clientString As Variant: clientString = Split(clientToTest) Hint (summary of other answers/comments): Works with objects too (Excel … Read more

Can I declare variables of different types in the initialization of a for loop? [duplicate]

Yes, that is prohibited. Just as otherwise you cannot declare variables of differing types in one declaration statement (edit: modulo the declarator modifiers that @MrLister mentions). You can declare structs for (struct { int a = 0; short b = 0; } d; d.a < 10; ++d.a, ++d.b ) {} C++03 code: for (struct { … Read more