|
|
CSS 341 - Fundamentals
of Programming Theory and Applications Most examples provided by Kelvin Sung |
|
Lecture Week/Date |
What |
For Download |
| Week 4 | ByValByRef: explores the differences between subprogram calls by reference and by value. | ByValByRef.vbs |
| Scope Rules: explores the scope of variables, global and local | ScopeRules.vbs | |
|
|
HTML with Excel
Uses subprograms to open and
initialize a spreadsheet before placing a number in a cell. |
|
|
|
Array: How to declare, how
to use, how to pass to function. Fix size array(). UBound,
LBound() and Number of entries defined in the
array. One characteristic with arrays defined using Dim A(n), once defined
you cannot change the size of the array. |
|
|
|
Dynamic Array: ReDim
and Preserve. Of course, we want to know what if we do
not know the size of the array before hand? ReDim with Preserve: is a very expensive operation.
Whenever you want to ReDim, always ask for more
than you need (just in case). |
|
|
|
Working with text file: Our script knows how to open this file and read in every
line in the file. Here is an example Text File. |
|
|
|
Using Dynamic Array:
ReDim and Preserve.
|
|
|
|
FileOpenDialog: Opening
files with MSO file dialog utility. |
|
|
|
Word: Working with Microsoft Word through ActiveX. |
|
|
|
FindString: Number of occurrences of a string. |
|
|
|
Random Numbers: Wooo, we can generate random numbers. How interesting! We can write a program to do something we cannot control! |
|
|
|
|