<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://mirkwood.cs.edinboro.edu/dokuwiki/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/feed.php">
        <title>PennWest Edinboro CS Wiki guides:programstyle</title>
        <description></description>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/</link>
        <image rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico" />
       <dc:date>2026-04-30T16:30:39+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:codeblocks&amp;rev=1659441553&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:comments&amp;rev=1659441553&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:constants&amp;rev=1659441553&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:functions&amp;rev=1659441553&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:globals&amp;rev=1659442066&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:goto&amp;rev=1659441553&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:identifiers&amp;rev=1659441553&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:indentation&amp;rev=1659441553&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:start&amp;rev=1659441553&amp;do=diff"/>
                <rdf:li rdf:resource="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:whitespace&amp;rev=1659441553&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico">
        <title>PennWest Edinboro CS Wiki</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/</link>
        <url>https://mirkwood.cs.edinboro.edu/dokuwiki/lib/tpl/dokuwiki/images/favicon.ico</url>
    </image>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:codeblocks&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:codeblocks</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:codeblocks&amp;rev=1659441553&amp;do=diff</link>
        <description>Compound Statements or Code Blocks

Short Answer

The body of all control structures should be enclosed in a code block.  This rule applies to control structure bodies with a single simple statement.

Acceptable examples:



if (x &gt; 5) {
   big = true;
}

for (i = 0; i &lt; 10; i++) {
   cout &lt;&lt; i &lt;&lt; endl;
}

do {
   ProcessItem(count);
} while ( count &lt; 7);</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:comments&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:comments</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:comments&amp;rev=1659441553&amp;do=diff</link>
        <description>Comments and Documentation

This guide provides general guidelines for the use of comments and documentation.  Directions given by your instructor supersede these instructions.

The purpose of comments and documentation is to allow readers of the program to understand what is happening.  This could be the original programmer, someone who has taken over maintenance of the code, or even a casual reader of the code.  Documentation generally falls into two categories, comments and self documenting c…</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:constants&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:constants</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:constants&amp;rev=1659441553&amp;do=diff</link>
        <description>Constants

If a constant used in a program has a meaning, or it is possible that this constant may be changed in the future, the constant should be named.  In general there should be no magic numbers or numbers that have a meaning but are not named, in a program.</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:functions&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:functions</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:functions&amp;rev=1659441553&amp;do=diff</link>
        <description>Functions

The proper use of functions can create code which is readable, can be debugged, and can be extended.  Functions can break code into small, more understandable segments.  Functions can be used to eliminate duplicated code.

The local style guide suggests students err on the side of creating too many functions.</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:globals&amp;rev=1659442066&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T12:07:46+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:globals</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:globals&amp;rev=1659442066&amp;do=diff</link>
        <description>Global Variables

Global variables are variables that are declared outside the scope of a function.  While it is common, even encouraged, to declare global constants, global variables are problematic as program size increases.  Because of this, the use of global variables should be limited.</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:goto&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:goto</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:goto&amp;rev=1659441553&amp;do=diff</link>
        <description>Use of goto/break/continue/return Statements

All of these statements change the flow of control in a c++ program.  They change the behavior of control structures and therefore make it more difficult to understand the final flow of control in a program.  For these reasons, the use of these statements is heavily restricted.</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:identifiers&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:identifiers</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:identifiers&amp;rev=1659441553&amp;do=diff</link>
        <description>Conventions for Identifiers

In a programming language, and identifier is a name associated with a user declared item in the program.  This may include variables, constants, types, functions, or other items.

There are two basic conventions that simplify program comprehension when creating identifiers.  Identifiers name should be meaningful and should follow the formatting convention.</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:indentation&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:indentation</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:indentation&amp;rev=1659441553&amp;do=diff</link>
        <description>Indentation

The goal of indentation is to make it easier for programmers to recognize blocks of code contained within a structure.  To that end, code within a structure should be indented by a standard amount.  A second use of indentation is to associate code from a single statement which exceeds a single line with the beginning of that statement.</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:start&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:start</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:start&amp;rev=1659441553&amp;do=diff</link>
        <description>Local Programming Style Guide

C++

	*  Identifiers
	*  Use of Constants
	*  Comments and Documentation
	*  Use of Whitespace
	*  Code Blocks
	*  Indentation
	*  Use of goto/continue/break/return Statements
	*  Functions
	*  Global Variables
	*  The Standard Algorithm/Template Libraries
	*  Other Items</description>
    </item>
    <item rdf:about="https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:whitespace&amp;rev=1659441553&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-08-02T11:59:13+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>guides:programstyle:whitespace</title>
        <link>https://mirkwood.cs.edinboro.edu/dokuwiki/doku.php?id=guides:programstyle:whitespace&amp;rev=1659441553&amp;do=diff</link>
        <description>Use of Whitespace in Programs

Whitespace is a character or set of characters that produce “space” in a text file.  Generally whitespace is generated by three keys, the spacebar, the tab key, and the enter key.  

The appropriate use of whitespace characters greatly enhances the readability of code.</description>
    </item>
</rdf:RDF>
