|
Introduction to Microcontroller Programming * Course Index * Introduction * About the Author * About this Course * Feedback * Course Navigation * Quick Course Navigation * How to use this Course * Acronyms Used and Course Conventions About PICmicro Chips * What is a PICmicro? * Microcontrollers * Digital versus Analogue * Inputs and Outputs * Memory * Programming * 16F1937 Architecture Clocking Your PICmicro Devices * Introduction * The Clock Circuit * Clock Settings * Clock Confusion E-Blocks * Introduction to E-blocks * Using E-blocks * E-blocks Boards Flowcode Step By Step * Introduction to Flowcode * Basic Flowcode Functions * Digital Outputs * Digital Inputs * Basic Loops * The LCD Display * Binary Numbers * Decisions * Goto (Connection Point) * 7-Segment Displays * Software Macro * Strings and Memory * A Simple Hi-Fi PICmicro Projects * Introduction to PICmicro Projects * Construction Methods * Choosing a Power Source * Adding Inputs * Input Conditioning * Adding Outputs * Adding Drivers Labs * Introduction and Lesson Plan * 1. Output * 2. Delay * 3. Connection Point * 4. Calculations * 5. Loop * 6. Input * 7. Decision * 8. LCD * 9. Keypad * 10. Analogue + EEPROM * 11. Software Macro * 12. External Interrupt * 13. Timer Interrupt |
(:Summary:Contains the 'action' links (like Browse, Edit, History, etc.), placed at the top of the page, see site page actions:) (:comment This page can be somewhat complex to figure out the first time you see it. Its contents are documented at PmWiki.SitePageActions if you need help. :) * Print (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) * %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) * Login PmWiki /
ConditionalMarkup(:Summary: PmWiki group header. Includes styles and trail.:) (:comment please leave the multiple style definitions concatenated as a single line. Linebreaks do appear in the output when the wiki is configured with linebreaks enabled -- thanks!:) (:comment included in PmWiki localisation headers and footers :) authors, admins (advanced)
(:nl:)(:Summary:The if directive allows portions of a page to be included or excluded from rendering:)
(:Audience: authors, admins (advanced) :)
The Using the (:if:) DirectiveThe generic forms of the -> where "cond" names a condition to be tested, and "param" is a parameter or other argument to the condition. ''Note that Built-in ConditionsThe built-in conditions include:
The name and group conditionals will work even for an included page, as the "name" and "group" conditionals always check the currently displayed page, as opposed to the page that the markup appears in. '''Note''': Although there is no built-in conditional markup to test ?action=, you can use Concatenated conditionsIn some cases where built in conditions have a parameter the parameters may be concatenated using a comma, viz: * @@ (:if name Name1,Name2,-Name3:) @@ * @@ (:if group -Group1,Group2,Group3:) @@ Negated ConditionsNegated forms of conditions also work:
Nesting ConditionsNote that Conditions can be nested from 2.2.beta 66. To have nested conditionals you need to number the if, and the matching else/ifend: ->
(:if cond1:)
cond1 is true
(:if2 cond2:)
cond1 and cond2 are true
(:elseif2 cond3:)
cond1 and cond3 are true, cond2 is not
(:else2:)
cond1 is true, cond2 and cond3 are not
(:if2end:)
(:else:)
cond1 is false, cond2 testing was ignored
(:ifend:)
''Spaces were added for better readability.''
Using wildcard placeholdersThe character
Using page text variables, page variables and markup expressionsPage text variables (PTVs), page variables (PVs) and markup expressions can be used in conditional markup. They will be assigned/evaluated before the condition(s). Combining conditionsConditions (as previously defined) may be combined into more complex conditional expressions using one of these three equivalent forms: -> (:if expr EXPRESSION :) (:if [ EXPRESSION ] :) (:if ( EXPRESSION ) :) Conditions are combined into expressions with boolean operators and brackets. In the next table, A and B are either regular conditions or (round-)bracketed sub-expressions of regular conditions: >>indent<<
>><< Example -> (:if [ name SomePage and group SomeGroup ]:) equivalent to (:if name SomeGroup.SomePage:) '''Important Notes:''' * Spaces are ''required'' around operators and brackets. * No specific feedback is given for syntax errors or unbalanced brackets. * Use round brackets (not square) for nested expressions. Thus, the following is a valid way of building an expression that shows the following contents only when the user is either the administrator, or is logged in and the time is later than the given date: -> Nesting with square brackets will silently fail to work as expected: -> A common use of these complex tests are for expressions like: -> which provides a ''logout'' link only when the browser has admin, attr, or edit permissions. admins (advanced) Creating new conditionsSee Cookbook:ConditionalMarkupSamples. See also special references for the use of {*$Variables}.(:nl:)(:Summary:Trail and talk page links:) (:comment included in PmWiki localisation headers and footers :) <<? >>bgcolor=#ffe border-top="1px solid black" font-size=.8em<< This page may have a more recent version on pmwiki.org: PmWiki:ConditionalMarkup, and a talk page: PmWiki:ConditionalMarkup-Talk. >><< |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(:Summary: Website page footer:)
Print - (:comment (:if group Site,SiteAdmin,Cookbook,Profiles,PmWiki*:) (:comment delete if and ifend to enable backlinks:) %item rel=nofollow class=backlinks accesskey='$[ak_backlinks]'% [[{*$Name}?action=search&q=link={*$FullName} | $[Backlinks] ]] (:ifend:) :) Search - Login
Page last modified on August 28, 2020, at 10:30 AM