program run_strvec
use TYPES
use SYSTEM
use STRVEC
use TEXTFILE
# include "macros"
implicit none
STRVEC* :: s
tonto.initialize
stdout.create_stdout
stdout.open
s.create( ["hello ", "how ", "are ", "you ", "finding", &
"TONTO ", "? ", "hello ", "? ", "? "] )
stdout.flush
stdout.text("Here is a vector of strings:")
stdout.flush
stdout.put(s,"column")
stdout.flush
stdout.text("Here are the same strings sorted in alpabetical order.")
stdout.text("In fortran, all capitals come before lower cases!")
stdout.flush
s.sort
stdout.put(s,"column")
stdout.flush
stdout.text("Here are the same strings in upper case:")
stdout.flush
s.to_upper_case
stdout.put(s,"column")
stdout.flush
stdout.text("Now I remove all repetitions:")
stdout.flush
s.remove_repetitions
stdout.put(s,"column")
end |