define argument types in subs - Printable Version +- Qbasicnews.com (http://qbasicnews.com/newforum) +-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html) +--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html) +--- Thread: define argument types in subs (/thread-3186.html) |
define argument types in subs - KiZ - 02-25-2004 hmm... *goes and makes a test program* Nope, it defitely doesnt work. It highlights the period and says "Parameter type mismatch" this is the test I used: Code: DECLARE SUB blah (i!, a!) define argument types in subs - na_th_an - 02-25-2004 Quote:hmm... *goes and makes a test program* Of course it does not work. You are declaring your parameters as SINGLE and you are attempting to pass INTEGER parameters. Change the code to: Code: DECLARE SUB blah (i%, a%) define argument types in subs - KiZ - 02-25-2004 ... duh!! I cant believe I didnt see that! Even the error was telling me what was wrong! yeesh. I am too tired to realise these things... sorry nath. define argument types in subs - TheBigBasicQ - 02-28-2004 Dark you can pass a whole array as well: Code: TYPE mytype Havent tested it but it should work =). define argument types in subs - KiZ - 02-29-2004 Cool, i see how. ok, thanks. define argument types in subs - TheBigBasicQ - 02-29-2004 Did my example work? I've to still test it =P. define argument types in subs - relsoft - 03-01-2004 Quote:I don't comment my code, and I don't think I code sloppy (anymore)... I only use comments where I'm approaching a difficult task and need it broken down into steps. I delete the comments afterwards. Why do you do that? If I may ask? :???: define argument types in subs - TheBigBasicQ - 03-01-2004 Isnt it obvious? He doesnt want anyone to understand what he has written =P. define argument types in subs - relsoft - 03-01-2004 Well , he can just didtribute w/o the source. :*) define argument types in subs - TheBigBasicQ - 03-01-2004 no, he will distribut the source. |