CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 1999
    Location
    California, USA
    Posts
    40

    modular programming

    whats a module for? some people have told me that it repeats stuff and some weird stuff. i just want a simple basic way for me to no what a module is. i no that it is a .bas file and i no if you want to call a sub you just type call whatever(). thanks

    PanasonicSubz

  2. #2
    Join Date
    Dec 1999
    Location
    Israel
    Posts
    101

    Re: modular programming

    First of all, you just have to understand that every variable and function has its own range of validity.
    I mean, that if you, for example, in Private Sub Form1_Load write Dim MyVar1 As Integer, this variable
    exist only during execution of this subroutine, so other functions and subroutines don't understand and
    don't recognize this variable. The same thing is with the functions and subroutines, so if you'll try to use the above mentioned Form1_Load in Form2, it will not work. There is a good way to use variables,
    functions, etc., in other places. You just declare them as Public. It is a common way to put all the public
    declarations in Module. You don't must do it, it just a common way, like you can give your variable any
    name, but if you want that somebody else understand your program, you add to this name first letter,
    which shows the type of this variable, for example, Dim iCount As Integer. So if you want to look on
    all of your Public variables, user-defined types, functions, subroutines, API functions, etc., you'll find them in one place, in Module. Again, you can put them where you want, nobody will press on you to do it, it is like a good habbit, accepted by most programmers.


  3. #3
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Re: modular programming

    How many times do we have to tell you go read some VB books....it'll be better for you and for us if you would read at least one book.


  4. #4
    Join Date
    May 1999
    Location
    Oxford UK
    Posts
    1,459

    Re: modular programming

    LOL!

    But that would involve *reading* and then he'd actually have to do some *coding* - plus the fact that this post has been answered correctly about 3 times so far (check the posting history)


    Chris Eastwood

    CodeGuru - the website for developers
    http://codeguru.developer.com/vb

  5. #5
    Join Date
    Aug 1999
    Location
    US, Florida
    Posts
    817

    Re: modular programming

    LOL!
    The point is that he never reads any books and he never uses VB help....but plus to all this he can't even read replys to his own postings!!!!
    You know I'll be cracking up if he'll decide to set his "program" as a commercial product!!!
    So called "programmer"....


  6. #6
    Join Date
    Sep 1999
    Location
    Northern Utah, U.S. of America
    Posts
    38

    Re: modular programming

    From one past programmer,

    In other words, You will not have to 're-invent' the same wheel over, and over again. You only need to invent the wheel(source code/software) only ONCE. Now hit the book.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured