Welcome Guest | My Membership | Login

MV Your Way: Extending mvBASIC


Most flavors of mvBASIC have a little used, often misunderstood structure called FUNCTION . It isn't exactly like FUNCTION in other languages. In PHP, JavaScript, nearly every language that has it, you can stack dozens of FUNCTION s into a single script or source record. The one in mvBASIC requires its own document. One function per source record. On a quick glance, this makes it look like a poor cousin of SUBROUTINE . You couldn't be blamed for thinking it has no real purpose.

That's what I thought for most of my career. Now, I'm beginning to develop a deep respect for it instead. In this article, and the next, I hope to sell you on the value of the humble FUNCTION .

The line of code in Figure 1 will not compile in mvBASIC.

019 doz = xconv(quantity,'unitsToDozens')
Figure 1

It sure would be nice to have a built-in library of any-to-any math conversions. If XCONV existed, it could convert radius to circumference. It could change liters to ounces. There are plenty of standard conversions that I don't need to recode over and over again.


Social Media Login

Use your existing social media logins to access your Membership/Subscription information.

Existing Magazine/Newsletter Subscriber (Quick Access)

If you are an existing International Spectrum subscriber, but have not registered with the website, please enter the Reference Code found on the magazine or in the e-mails you receive from us.

Magazine Reference Code location

Spectrum Login

New Subscriber

If you currently do not receive the Magazine or other emails from International Spectrum, select the "Subscribe" button below to create an new membership account.


Find out more about the different between the FREE and a Professional Membership at:
Compare Account Options


# # #          # # #          # # #


Related Articles

  • From the Inside May/June 2018

    Company: International Spectrum

    Our community has been battling this issue for years: the perceived lack of entry and mid-level developers. One of the things that I noticed in the last few Spectrum Conferences was that the age demographic of our attendees was trending younger.

  • 37th Annual Spectrum Conference Recap

    Company: International Spectrum

    The International Spectrum Conference for 2018 covered a lot about modernizing systems and re-inventing your IT environment for both new and existing developers. See what you missed at this year's four days of education, networking, and more.

  • Using OWIN Security with MultiValue Data - Part 3

    Company: International Spectrum

    Our series on OWIN continues with even more information about OWIN classes. This will give you the information you need to create the proper connection points between your database environment and OWIN.

  • Business Tech: Watch Your Language

    Company: HDWP

    Knowing a new developers roots, and how they were shown to do things is important when training new developers. In this Article, Chuck talks about how to talk at new developers that are coming from different languages.

  • Are you a Technology Bigot?

    Company: Precision Solutions

    When all you have is a hammer... Are we selecting technology for projects based upon what we like to use, or are we making objective choices? Kevin King attempts to resolve the age old question: Which technology is best?

Return to top