AllBusiness.com
    • Starting a Business
    • Career
    • Sales & Marketing
    • AI
    • Finance & Fundraising
    • M & A
    • Tech
    • Business Resources
    • Business Directory
    1. Home»
    2. Barrons Dictionary»
    3. local variable»

    Definition of local variable

    Dictionary of Computer and Internet Terms: local variable
    local variable

    a variable that has meaning only within a particular function, subroutine, or other program unit.The name of a local variable can be used in another subroutine elsewhere in the program, where it will refer to an entirely different variable. Local variables contrast with global variables, which are recognized throughout the program.

    The advantage of using local variables is not obvious in short programs. However, it is a good idea when writing a long program to make as many variables as possible local, because then there will be no problem if you wish to use the same name to mean something else elsewhere in the program. This rule is even more important if several different people are writing subroutines that will be combined into one main program.

    Search for definitions

    BizBuySell
    logo
    AllBusiness.com is a premier business website dedicated to providing entrepreneurs, business owners, and business professionals with articles, insights, actionable advice,
    and cutting-edge guides and resources. Covering a wide range of topics, from starting a business, fundraising, sales and marketing, and leadership, to emerging AI
    technologies and industry trends, AllBusiness.com empowers professionals with the knowledge they need to succeed.
    About UsContact UsExpert AuthorsGuest PostEmail NewsletterAdvertiseCookiesIntellectual PropertyTerms of UsePrivacy Policy
    Copyright © AliBusiness.com All Rights Reserved.
    logo
    • Experts
      • Latest Expert Articles
      • Expert Bios
      • Become an Expert
      • Become a Contributor
    • Starting a Business
      • Home-Based Business
      • Online Business
      • Franchising
      • Buying a Business
      • Selling a Business
      • Starting a Business
    • AI
    • Sales & Marketing
      • Advertising, Marketing & PR
      • Customer Service
      • E-Commerce
      • Pricing and Merchandising
      • Sales
      • Content Marketing
      • Search Engine Marketing
      • Search Engine Optimization
      • Social Media
    • Finance & Fundraising
      • Angel and Venture Funding
      • Accounting and Budgeting
      • Business Planning
      • Financing & Credit
      • Insurance & Risk Management
      • Legal
      • Taxes
      • Personal Finance
    • Technology
      • Apps
      • Cloud Computing
      • Hardware
      • Internet
      • Mobile
      • Security
      • Software
      • SOHO & Home Businesses
      • Office Technology
    • Career
      • Company Culture
      • Compensation & Benefits
      • Employee Evaluations
      • Health & Safety
      • Hiring & Firing
      • Women in Business
      • Outsourcing
      • Your Career
      • Operations
      • Mergers and Acquisitions
    • Operations
    • Mergers & Acquisitions
    • Business Resources
      • AI Dictionary
      • Forms and Agreements
      • Guides
      • Company Profiles
        • Business Directory
        • Create a Profile
        • Sample Profile
      • Business Terms Dictionary
      • Personal Finance Dictionary
      • Slideshows
      • Entrepreneur Profiles
      • Product Reviews
      • Video
    • About Us
      • Create Company Profile
      • Advertise
      • Email Newsletter
      • Contact Us
      • About Us
      • Terms of Use
      • Contribute Content
      • Intellectual Property
      • Privacy
      • Cookies