Preview

Unit 8 Sidar

Good Essays
Open Document
Open Document
502 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
Unit 8 Sidar
Programming Style

It is a good programming practice to follow certain style so that the code:

- is fully legible
- is easily followed and has logical structure
- contains general information such as name, date, software name and version, project details, etc.
- contains useful comments
- indented where needed

An example of the general details can be as follows:

' Name: John Smith
' Date: 01 FEB 2013
' Software: Visual Basic – 2010 Express
' Project: Total
' Object: frmTotal
' Version: 1
' Notes: This program is for calculation of sum of two numbers
' ------------------------------------------------------------------------------------------------------
In Visual Basic programming, the symbol ( ' ) is used for adding comments. Comments can be included in two ways, the first method as heading, secondly as a brief note by each line. Comments should be added freely in order to help tracing the objectives of the program. This becomes more important if it is needed to be referred back to the program after a certain period for further works or another programmer is required to carry out further development work.

' The following section is for Comments as heading
' defining two variables

' input by the user and the result

Dim X As Integer
Dim Y As Integer
Dim Z As Integer . . .

Z = X + Y ' calculate the sum of two numbers Comments next to a line . .

It is essential to use indentation wherever is required. The number of spaces used for indentation is up to the programmer. The size of the indentation should not be small in order to be able clearly see the section of the code indented, and not too large to avoid unnecessary scrolling to the left and right. As a guideline, four spaces is sufficient for indentation. The TAB key can also be used for indentation, but may not appear the same when printed. The other main areas are when IF blocks and LOOPS

You May Also Find These Documents Helpful

  • Better Essays

    UNIT 8 10

    • 1333 Words
    • 4 Pages

    In the adult social care setting it is vital that when handling medications are involved, service providers must follow the organisational policies and procedures to the letter, as this is keeping in line with the law. It is important to acknowledge and be aware of your own limitations when it comes to handling medications; this ensures the safety of the service provider, service users and to others. When following the policies and procedures it is necessary to receive the appropriate level of training associated with handling medications this includes: storing, ordering, receiving, administration, the recording and the disposal of medication. It is vital that training is kept up to date on a regular basis in case of any changes in legislation or policies and procedures. It is also vital to only do what you are trained for and deemed competent to do so, working in line with the codes of conduct. In addition if there were any unsafe practices; for example, if a person asks you to distribute medication without training, then it is a must to report those unsafe practices to the manager immediately.…

    • 1333 Words
    • 4 Pages
    Better Essays
  • Powerful Essays

    Microsoft visual Basic 6.0 is a third-Generation event-driven programming language and integrated (IDE) from Microsoft for its COM programming model first released in 1991.…

    • 1214 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    Nt1330 Unit 2 Assignment 1

    • 3740 Words
    • 15 Pages

    1. A while loop will not execute the body of the code if you have your test condition incorrect.…

    • 3740 Words
    • 15 Pages
    Satisfactory Essays
  • Good Essays

    This paper will describe the variable naming rules of three different programming languages. These three languages are Visual Basic, Python, and Java. Each of these languages has different rules that apply to them and some similarities. I will describe the rules and the similarities and differences in the next few paragraphs.…

    • 878 Words
    • 4 Pages
    Good Essays
  • Satisfactory Essays

    Unit 9 D1

    • 508 Words
    • 2 Pages

    All employees will need to share files, this is why a file server is needed, it will make it easier as the information and documents on the server won’t have to keep moving through people’s USB’s. There are three printers, two on the top floor and one on the bottom floor, this is so people who are working upstairs don’t have to bother going to another floor just for their printing. The third printer is for the boss because they won’t want all their information going out of a regular printer just in case there is confidential information which needs to be withheld from the employees.…

    • 508 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    unit 221

    • 481 Words
    • 2 Pages

    Knowledge Evidence for Unit 221 – Use office equipment (for Outcomes 1.1, 1.2, 1.3, 4.1 & 4.3)…

    • 481 Words
    • 2 Pages
    Satisfactory Essays
  • Powerful Essays

    In the space provided below, copy and paste your VBScript Program Code. If it doesn’t fit, use the next page for the continuation of your sourcecode program…

    • 529 Words
    • 3 Pages
    Powerful Essays
  • Powerful Essays

    Unit 8 M2

    • 1161 Words
    • 5 Pages

    (Completion of this task will provide evidence for M2: Analyse your contribution to the selection process in a given situation)…

    • 1161 Words
    • 5 Pages
    Powerful Essays
  • Powerful Essays

    Unit 8 P4

    • 4450 Words
    • 18 Pages

    In this assignment I am going to talk about the most significant environmental legislations and codes of practice for farmers and land owners. I will also describe the impact of these on farming practices. In this assignment I am going to explain the role of three selected environmental organisations within the agriculture industry. At least one of these will be a government body, and another a charitable organisation.…

    • 4450 Words
    • 18 Pages
    Powerful Essays
  • Satisfactory Essays

    Unit 11 D1

    • 541 Words
    • 3 Pages

    The vitamins in the diet plan provide him with healthy skin and hair , it also helps towards bone growth, as well as helping the digestive system and it helps reduce cholestrol levels. The vitamins in the diet plan are fruit and vegatables, which also adds to his 5 a day.…

    • 541 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    Unit 9 P1

    • 780 Words
    • 4 Pages

    Unit 9- Outdoor and Adventurous Expeditions P1- Describe 4 Different Expeditions By: Hayley Hawkins Anna McNuf Aim: Cycle 11,000 miles around 50 USA states along with to get kids and communities inspired on bikes and to raise awareness and funds for a chosen charity Year: July, 2013 Expedition: cycle 11,000 miles through North America, taking in one beautiful Canadian province and all 50 states of the USA. Starting in Alaska and ending with Hawaii Goal: Cycle through 50 States Equipment- clothes, bike, tent, sleeping bag, map, cycling shoes, water cleaner (Jet Boil Flash), GO PRO, Ipad and Iphone. Starting in Alaska and ending in Hawaii, I'll pedalled, unassisted, through each and every US state.…

    • 780 Words
    • 4 Pages
    Good Essays
  • Good Essays

    Unit 9 D2

    • 538 Words
    • 3 Pages

    f you would like to improve the awareness and take-up of your course, the ISRM can offer you a ‘Click for details’ button next to your advert, this link will take prospective participants through to an advert for your course. The advert will need to contain an ISRM logo, available by request for all trainers and will need to promote ISRM courses only. There is a small charge for this service.…

    • 538 Words
    • 3 Pages
    Good Essays
  • Powerful Essays

    Unit 8 P1

    • 1345 Words
    • 5 Pages

    This psychological perspective focuses on an individual’s behaviour, the two theories which are Pavlov and Skinner.…

    • 1345 Words
    • 5 Pages
    Powerful Essays
  • Good Essays

    Unit 8 M2

    • 366 Words
    • 2 Pages

    Government agencies are set up to specifically monitor and combat terrorism. These agencies in the UK are NaCTSO (National counter terrorism security office) SIS (MI6). The biggest threat to the National security comes from overseas. Al-Qaeda and their leaders are the biggest threat to our nation at the moment. The threat is becoming more diverse as groups associated to and inspired by Al-Qaeda develop more independence in directing operations. Therefore we are likely to see a more unpredictable picture in the future, potentially with more frequent, although less sophisticated attacks. The UK is at the forefront of international co-operation against the threat posed by international terrorists. Since 2003, the UK has been applying a long-term strategy for countering international terrorism and the extremism that lies behind it. The main aim of these agencies is to reduce the risk of national terrorism, so that people can live their lives without feeling unsafe or weary of religious groups. The UK counter-terrorism strategy is known as ‘contest’ and divided into four principal areas:…

    • 366 Words
    • 2 Pages
    Good Essays
  • Good Essays

    unit 11

    • 580 Words
    • 3 Pages

    P6 Explain the role of supportive relationships in reducing the risk of abuse and neglect.…

    • 580 Words
    • 3 Pages
    Good Essays