Hi Bob,

well, we'll see what other restrictions apply. Here's a first solution:

>> do %4bob.r
Script: "Untitled" (none)

>> a1: false
>> readFile "zzz"
>> a1: 1
>> readFile "this"
>> a1: false
>> readFile "that"

----------- output -------------
includelevel: 1 zzz
includelevel: 300 this
includelevel: 1 this
includelevel: 1 that


The script:

n1: 1

readFile: func [ name ] [
  if a1 [
    use [n1] [
      n1: 300
      doincl name n1
    ]
  ]
  doincl name n1
]

doincl: func [name n1] [
  print ["includelevel:" n1 name]
]




;- Elan >> [: - )]

Reply via email to