|
Post by programmer on Jul 1, 2002 23:04:39 GMT
some plz tell me wut in the world subs and fuctions are for??
|
|
Elias
Junior Member
Posts: 78
|
Post by Elias on Jul 2, 2002 23:37:05 GMT
Subs are alternate processes that are stored apart to be called from diferent parts of the porogram without having to re-type it again, for example if you MUST write part of a program over and over in diferent parts of a program, then you should make it a SUB, anyways, you have to make DIM SHARED the values or they wont change between subs. MODULE SUBS are a little bit hard to handle, because instead of SHARE you must make a COMMON or add the variables to the sub, wich is kinda hard when you have TYPED some data... omg... am i getting confusing??... ok...
A function is much like a sub, but it will return 1 value instead of many... a FUNCTION can return string, integer, long Etc... Values. for example TIME$ is a function because it returns the system time. you could make a function called TODAY.DATE$ that would return the string representation of today's date and that would be a function. the value returned by a function is the name itself. if you want some examples ask me.
Elias.
|
|
|
Post by programmer on Jul 3, 2002 1:03:47 GMT
thank you!!! i finally no wut a sub is. oh and i've been reading the old posts that all of u put up. it seems that u left this message board for good. did u really leave? or have u been out? if u did leave y are u back?
|
|
Elias
Junior Member
Posts: 78
|
Post by Elias on Jul 3, 2002 3:37:27 GMT
that was like 3 months ago, my phone line was not working so when i got back i said it. anyway there was another message board were i saw more people coming... this one is slower, i dunno why.
|
|