How do I use a Global in a File Name?

I thought this would work but alas...
put "690" into global TestCaseID

put something into file <</Users>>&global TestCaseID&<<_log.txt>>


:roll:

Comments

  • EggplantMattEggplantMatt ForumAdmin admin
    put "690" into global TestCaseID
    put something into file ("Users" & global TestCaseID  & "_log.txt")
    
    You don't need the parens to read from a file:
    put "690" into global TestCaseID
    put file "Users" & global TestCaseID  & "_log.txt"
    
    Note too that you don't always have to specify the global keyword if you declare the variable as global for that handler:
    global TestCaseID -- variable is now in the global scope
    put "690" into TestCaseID
    put something into file ("Users" & TestCaseID  & "_log.txt")
    
Sign In or Register to comment.