Click_to_edit_Master_title___Cengage_Learning___Learning

上传人:xmg****18 文档编号:120142385 上传时间:2020-02-04 格式:PPT 页数:64 大小:3.56MB
返回 下载 相关 举报
Click_to_edit_Master_title___Cengage_Learning___Learning_第1页
第1页 / 共64页
Click_to_edit_Master_title___Cengage_Learning___Learning_第2页
第2页 / 共64页
Click_to_edit_Master_title___Cengage_Learning___Learning_第3页
第3页 / 共64页
Click_to_edit_Master_title___Cengage_Learning___Learning_第4页
第4页 / 共64页
Click_to_edit_Master_title___Cengage_Learning___Learning_第5页
第5页 / 共64页
点击查看更多>>
资源描述

《Click_to_edit_Master_title___Cengage_Learning___Learning》由会员分享,可在线阅读,更多相关《Click_to_edit_Master_title___Cengage_Learning___Learning(64页珍藏版)》请在金锄头文库上搜索。

1、1 2 MicrosoftVisualBasic NET Reloaded Objectives IncludetheselectionstructureinpseudocodeandinaflowchartWriteanIf Then ElsestatementWritecodethatusescomparisonoperatorsandlogicaloperatorsCreateavariablehavingblockscopeUsethelinecontinuationcharacter 3 MicrosoftVisualBasic NET Reloaded Objectives con

2、tinued ConcatenatestringsUsetheControlCharsNewLineconstantChangethecaseofastringDeterminewhetheranexpressioncanbeconvertedtoanumberDisplayamessageinamessagebox 4 MicrosoftVisualBasic NET Reloaded Objectives continued Includeanestedselectionstructureinpseudocode flowchart andcodeCodeanIf Elseif Elses

3、electionstructureIncludeaCaseselectionstructureinpseudocode flowchartandcode 5 MicrosoftVisualBasic NET Reloaded TheSelectionStructure AlsocalleddecisionstructureMakeacomparisonandchoosebetween2pathsdependingupontheresultofcomparison condition 6 MicrosoftVisualBasic NET Reloaded WritingPseudocodefor

4、theIfandIf ElseSelectionStructures Ifselectionstructure 1setofinstructionswhichareprocessedifconditionistrueIf Else 2setsofinstructions thefirstwhenconditionistrue theotherwhenconditionisfalse 7 MicrosoftVisualBasic NET Reloaded FlowchartingtheIfandIf ElseSelectionStructures 8 MicrosoftVisualBasic N

5、ET Reloaded CodingtheIfandIf ElseSelectionStructures 9 MicrosoftVisualBasic NET Reloaded CodingtheIfandIf ElseSelectionStructures continued StatementBlockSetofinstructionsin true path betweenkeywordsIfandThen Optionalsetofinstructionsin false path betweenkeywordsThenandEndIf Anyitemsinsquarebrackets

6、areoptional 10 MicrosoftVisualBasic NET Reloaded ComparisonOperators Alsoreferredtoasrelationaloperators 11 MicrosoftVisualBasic NET Reloaded ComparisonOperators continued 12 MicrosoftVisualBasic NET Reloaded UsingComparisonOperators Example1 13 MicrosoftVisualBasic NET Reloaded UsingComparisonOpera

7、tors Example1 continued Note variableintTemphasblockscopeandcanonlybeusedinblockinwhichdeclared 14 MicrosoftVisualBasic NET Reloaded UsingComparisonOperators Example1 continued 15 MicrosoftVisualBasic NET Reloaded UsingComparisonOperators Example1 continued LinecontinuationcharacterSpacefollowedbyan

8、underscoreUsedtobreakuplonginstructionsonto2linesConcatenationOperatorTheampersand Usedtoconcatenate connectorlink strings 16 MicrosoftVisualBasic NET Reloaded UsingComparisonOperators Example1 continued 17 MicrosoftVisualBasic NET Reloaded HOWTO 18 MicrosoftVisualBasic NET Reloaded UsingComparisonO

9、perators Example2 19 MicrosoftVisualBasic NET Reloaded UsingComparisonOperators Example2 continued 20 MicrosoftVisualBasic NET Reloaded UsingComparisonOperators Example2 continued 21 MicrosoftVisualBasic NET Reloaded UsingtheToUpperandToLowerMethods 22 MicrosoftVisualBasic NET Reloaded UsingtheToUpp

10、erandToLowerMethods continued 23 MicrosoftVisualBasic NET Reloaded UsingtheToUpperandToLowerMethods continued 24 MicrosoftVisualBasic NET Reloaded LogicalOperators 25 MicrosoftVisualBasic NET Reloaded LogicalOperators continued 26 MicrosoftVisualBasic NET Reloaded TruthTables 27 MicrosoftVisualBasic

11、 NET Reloaded TruthTables continued Note short circuitevaluationcanoccurwith And operator Bothconditionswillnotbetestediffirstconditiontestsfalse 28 MicrosoftVisualBasic NET Reloaded UsingtheTruthTables Understandingorderofprecedenceiscritical 29 MicrosoftVisualBasic NET Reloaded UsingtheTruthTables

12、 continued 30 MicrosoftVisualBasic NET Reloaded UsingLogicalOperatorsinanIf Then ElseStatement 31 MicrosoftVisualBasic NET Reloaded ModifyingtheSkate AwaySalesApplication 32 MicrosoftVisualBasic NET Reloaded ModifyingtheSkate AwaySalesApplication continued Modifytoeliminateunwantederrormessage 33 Mi

13、crosoftVisualBasic NET Reloaded ModifyingtheSkate AwaySalesApplication continued 34 MicrosoftVisualBasic NET Reloaded TheIsNumericFunction Function ApredefinedprocedurethatperformsaspecifictaskandreturnsavalueaftercompletingthetaskIsNumericfunctionchecksifanexpressioncanbeconvertedtoanumberReturnsBo

14、oleantrueifabletoconverttonumberReturnsBooleanfalseifconversioncantbemade 35 MicrosoftVisualBasic NET Reloaded TheIsNumericFunction continued 36 MicrosoftVisualBasic NET Reloaded TheMessageBox Showmethod 37 MicrosoftVisualBasic NET Reloaded TheMessageBox Showmethod continued ArgumentsintheMessageBox

15、 ShowmethodText astringcontainingthetexttodisplayCaption textdisplayedintitlebarButtons buttonstodisplayinmessageboxCanbeoneof6differentconstantsIcon icondisplayedintitlebarDefaultbutton buttonautomaticallyselectedifuserpressestheEnterkeyonkeyboard 38 MicrosoftVisualBasic NET Reloaded TheMessageBox

16、Showmethod continued 39 MicrosoftVisualBasic NET Reloaded TheMessageBox Showmethod continued 40 MicrosoftVisualBasic NET Reloaded HOWTO 41 MicrosoftVisualBasic NET Reloaded NestedSelectionStructures Whenatleastonesideoftheselectionstructure spathcontainsanotherselectionstructureInnerstructureisreferredtoas nested Else ispairedupwithnearestprecedingIfregardlessofindentationofcodeUsewhenyouwanttomakeonedecisionandthenchoosebetweentwooptionsdependingupontheresultofthefirstdecision 42 MicrosoftVisua

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 大杂烩/其它

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号