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 - adosorken - 02-16-2004 That reminds me of an old coder's phrase... "Real coders don't comment. If it was hard to code, it should be hard to understand." :lol: :lol: :lol: define argument types in subs - TheBigBasicQ - 02-16-2004 Bleh thats a cover up for writing sloppy code :roll: define argument types in subs - adosorken - 02-16-2004 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. define argument types in subs - TheBigBasicQ - 02-18-2004 Well i too comment on something difficult. But I leave the comments as they are if its a long term project =). define argument types in subs - Dr_Davenstein - 02-24-2004 Sub Hmmm(eek as MyDataType) Code: DECLARE SUB Hmmm (eek AS ANY) define argument types in subs - TheBigBasicQ - 02-24-2004 Dude, make a point. Just dont post code. Its....err.....wierd =P Re: define argument types in subs - Dr_Davenstein - 02-25-2004 Quote:Is there a way to define the types of arg in a sub? For exemple, set them all to integer? DEFINT doesn't work here. That was the original post... Quote:Dude, make a point. Just dont post code. Its....err.....wierd =P:roll: Dude, it isn't weard. I just assumed that he would run the code that I posted. It was just another example of how to define the types of arguements in a sub. define argument types in subs - Neo - 02-25-2004 Hehe, your code looks scary with all those 'eeks' in it... *eek* define argument types in subs - KiZ - 02-25-2004 ok, heres a question which is a variation of that. if you have an array, with a datatype, why cant you pass it into a sub? ie why cant you: Code: CALL subblah(var1, var2, array(x).Z) why cant you do this? define argument types in subs - na_th_an - 02-25-2004 Quote:ok, heres a question which is a variation of that. as far as I know, you can. Code: DECLARE SUB subblah(var1%, var2%, var3%) |