File: stringtests.jnl

package info (click to toggle)
ferret-vis 7.6.0-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 218,500 kB
  • sloc: fortran: 234,502; ansic: 51,843; csh: 2,516; makefile: 1,613; sh: 1,571; pascal: 569; sed: 184; lisp: 122; awk: 26
file content (51 lines) | stat: -rw-r--r-- 1,533 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51

def axis/t=101:110:1/units=days/t0=1-jan-2000 tax
let tt = t[gt=tax]
let a = RESHAPE({"aaaa", "bb", "ccc", "ddddddddd", "e", "fff", "gggggg", "hh", "iiiii", "jjjjjjjjjjjjjj"}, tt)
list efstrings(a)

pause

let a = {"one", "m", "mississippi", "iowa", "florida"}
list maxstrlen(a)

pause
def axis/x=1:3:1 xax
def axis/z=2:20:2 zax
let var = x[gx=xax]  + z[gz=zax]
let a = RESHAPE({"PMEL", "carries", "out", "interdisciplinary", "scientific", "investigations", "in", "oceanography", "and", "atmospheric", "science.", "Current", "PMEL", "programs", "focus", "on", "open", "ocean", "observations", "in", "support", "of", "long-term", "monitoring", "and", "prediction", "of", "the", "ocean", "environment"}, var)

list pass_thru_string (a)
pause

list pick_a_string(a,2)
pause

list maxstrlen(a)
pause

! Fcns inherit grid of result from both args, so have Ferret conformability rules

list length_of_strings(a)

list string_len_sum(a,"..")
pause

! Two vars on the same grid
let a = {"one", "two"}
let b= {"_", "_bbb"}

list string_len_sum(a, b)

list string_cat3(a,b, ".dat")

pause


def axis/x=1:3:1 xax
def axis/z=2:20:2 zax
let var = x[gx=xax]  + z[gz=zax]
let a = RESHAPE({"PMEL", "carries", "out", "interdisciplinary", "scientific", "investigations", "in", "oceanography", "and", "atmospheric", "science.", "Current", "PMEL", "programs", "focus", "on", "open", "ocean", "observations", "in", "support", "of", "long-term", "monitoring", "and", "prediction", "of", "the", "ocean", "environment"}, var)

list string_cat3(a, " ", a)