Help >
Counting Functions
Version
7.11
Counting Functions
String Match
calc %xx=strmatch(string1;string2;"literal")
Compare two strings and report the number of positional character match-
es based on the characters provided in the literal. For example, suppose you are scoring a true/false test and the correct pattern of responses is given in string1 and a particular students response is in string two:
%s1 is tftftftftftftftftftftf
%s2 is tftttftftftttftftftftf
then
calc %xx=strmatch(%s1;%s2;"ft")
%xx will equal 20 (out of a possible 22 in this case).
Or suppose it's a multiple choice and the patterns are:
%s1 is abcdeabcdeabcdeabcde
%s2 is edcbaedcbaedcbaedcba
then
calc %xx=strmatch(%s1;%s2;"abcde")
provides the answer %xx=4. Finally, suppose the input literal was "abde" then the answer would have been 0 since the c matches didn't count. Even though the strings in these examples were small, don't forget that strings can be up to 4000 characters in length.
Get remaining free space on the specified drive
_storage("drive letter")
The _storagefunction is used to report the amount of storage remaining on the specified drive. Only the "drive letter" designation is supported by this function. For example:
calc %xx=_storage("c")
reports the amount of free space remaining on drive C:.
Copyright © 2019 , WhamTech, Inc. All rights reserved. This
document is provided for information purposes only and the contents hereof are
subject to change without notice. Names may be
trademarks of their respective owners.