Non-declaration of variables for MIDI Import

Started by Harbinger, April 22, 2010, 22:14:34

Previous topic - Next topic

Harbinger

In my translations, i have found that two variables -- gnMidiImportSpeed and gnMidiPatternLen -- were assigned values in MainFrm.cpp but were not declared in MainFrm.h (or in the preceding lines in the .cpp).

Could this be a source of our import problems, or is this just bad form?

Saga Musix

#1
MainFrm.cpp says:
extern UINT gnMidiImportSpeed;
That means "This variable is not declared in this module or in any included file, please look somewhere else". Not declaring variables is impossible in C(++) for a very good reason.
Those variables are actually declared in load_mid.cpp. The way they are declared (globally, not assigned to a class) makes me shiver a bit, though...
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.