You are on page 1of 20

Fundamentals Exam – Civil Engg

Computational Tools
Compiled by: R. Cordero
TOPICS

 Spreadsheet computations
 Basic computations
 Using macros
 User-programmed macros
 Structured programming
 Routines and functions
 Sequences
 Conditional constructs
 Iterative constructs
 Resources
 MS Excel and Excel VBA
 Scilab
Spreadsheet – from basic to elaborate
 Spreadsheet: paper presentation instrument
 piece of paper with rows and columns for recording financial data for use in comparative analysis*
 an outsize ledger sheet used by accountants*
* Free English Dictionay

 Spreadsheet: powerful number (and text) array manipulator/manager


 Table manipulation
 Scalar, vector and matrix manipulation
 Basic table presentación tool
 Basic graph presentation tool
 Function catalog and computing tools
 Spreadsheet: powerful programming tool
 Macro automated recording
 Macro user-programming
 Basic Windows interface
 Super calculator: high precision computing tool
Spreadsheet computations
 Basic computations
 Table oriented row and column (arithmetic/algebraic)
 Cell absolute and relative referencing
 Variable name declaration
 Range: row & column (vector) / range (matrix) operations
 Function based computing
 Using macros
 Automated macro recording
 Macro user editing and cutomization
 User-programmed macros
 Embeded Visual Basic for Applications (VBA) programming environment
 VBA suboutine and function declaration
 VBA variables declaration
 Programming logical constructs
 Spreadsheet interface
 Windows VBA interfase
Spreadsheet computations
 Using macros

 User-programmed macros
Structured Programming - Procedures
 Subroutines
 Recording a macro creates a subroutine
 A set of coded sequential instructions
 Intended to excecute a certain task or procedure
 Promotes structured programming practice

 Functions
 Similar to subroutines
 Can receive one or more arguments
 Typically produce single object output
 Can be used within algebraic expressions
 Can be thought of as data holders by its name
Structured Programming – Data elements
 VBA Constants and Variables : memory data holders
Structured Programming - Sequences

 Program procedures: sequential driven execution


 Orderly executed commands
Structured Programming - Sequences

 Functions: similar to subroutines


 Typically receive a set of arguments and renders a single data object
 Can be called from subroutines or functions, or used within the spreadsheet
Structured Programming – Looping structures

 Loops or cycles: iterative execution


 Excecutes a sequence, a certain amount of times
Structured Programming – FOR loops
 FOR … NEXT loops
 Excecutes a sequence, a given amount of times
Structured Programming – FOR loops
 FOR EACH … NEXT loops
 Excecutes a sequence over the i-th object in a list, for every object in the list
Structured Programming – FOR loops
 Some samples
Structured Programming – DO loops
 A variety of DO loop constructs
Structured Programming – DO loops
 Some samples
Structured Programming – Decision structures

 Bifurcation instructions: if <condition> then <task/sequence>


 If condition is true then do the task or sequence
Structured Programming – Decision structures
 IF … THEN samples

 IF … THEN … ELSE and IF … THEN … ELSEIF … ELSE samples


Structured Programming – Decision structures

 Selection instructions: Select Case <variable> … Case Is <value> Then


 In case variable equals value then do the task or sequence
Structured Programming – Decision structures

 SELECT CASE samples


References

 Dictionary, Encyclopedia and Thesaurus (The Free Dictionary)


 http://www.thefreedictionary.com/

 Programming In Excel VBA - An Introduction


 http://www.jlathamsite.com/LearningPage.htm

 Tutorial video series


 https://www.youtube.com/watch?v=78GvLEAZecs
 https://www.youtube.com/watch?v=Y-8pP_GWnao

 Scilab
 http://www.scilab.org/

You might also like