![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
#3
| |||
| |||
|
|
Tony, I'll ask you the same question I've always been meaning to ask people who raise this ... why? As a person that I know embraces the notion of structured code, how the hell could you NOT know if you had a file variable or not. Obviously something that you and the previous posters want to do that I just dont grok?!? |
#4
| |||
| |||
|
|
I'd like to bring up this topic again because I have some need for it myself now with D3NT. Here is the original discussion on the topic: http://tinyurl.com/33e7xd I'm looking for a solution that: 1) Doesn't go into debug 2) Doesn't clear select lists 3) Doesn't require a filesave after files are created. The goal is to make this code work flawlessly: EXECUTE "CREATE-FILE FOO 1 1" OPEN "FOO" TO FV ELSE STOP GOSUB DETERMINE.STATUS IF STATUS = 0 THEN CRT 'VARIABLE' ELSE CRT 'FILE' STOP DETERMINE.STATUS: * voodoo goes here to seeif FV is a variable or file var RETURN If no one has a solution for this yet then I might take a stab at it but I can't waste too much time on it - for free anyway .Thanks. T |
#5
| |||
| |||
|
|
Goo'day, Ross.... On 11 Feb 2007 19:41:20 -0800, "Ross Ferris" <rossf (AT) stamina (DOT) com.au wrote: Tony, I'll ask you the same question I've always been meaning to ask people who raise this ... why? As a person that I know embraces the notion of structured code, how the hell could you NOT know if you had a file variable or not. Obviously something that you and the previous posters want to do that I just dont grok?!? Me too. Me too... Would've thought file naming protocols and coding protocols for opening those files to whatever variables would've been very near the top, if not right at the top, of anybody's list of "Programming Rules"... See last week..... Even we (read "I") have got stringent rules for file naming/handling! Followed shortly thereafter by variable naming rules. S'pose you could always try to add one to the variable to find out.... Makes as much sense as trying to determine if you've got a file, or whatever, from code....... S'pose, also, we're going to see all sorts of code that'll match the dodgy code offered yesterday/today setting a variable to 5 and then starting a half-coded supposedly decrementing loop where the variable is set to 10 to start, and wondering what the answer would be, and why it's not the same as somebody else's answer ... Oh well, it takes all types.... BTW, does today's UniVerse still allow the FOR I = 1 to X do stuff ...... NEXT J construct? As a "clean" compile, no questions asked???? Regards, Bruce Nichol Talon Computer Services ALBURY NSW 2640 Australia If it ain't broke, fix it 'til it is |
#6
| |||
| |||
|
|
Tony, I'll ask you the same question I've always been meaning to ask people who raise this ... why? As a person that I know embraces the notion of structured code, how the hell could you NOT know if you had a file variable or not. Obviously something that you and the previous posters want to do that I just dont grok?!? |
#7
| |||
| |||
|
|
Tony, I'll ask you the same question I've always been meaning to ask people who raise this ... why? As a person that I know embraces the notion of structured code, how the hell could you NOT know if you had a file variable or not. Obviously something that you and the previous posters want to do that I just dont grok?!? |
#8
| |||
| |||
|
|
"Ross Ferris" wrote: Tony, I'll ask you the same question I've always been meaning to ask people who raise this ... why? As a person that I know embraces the notion of structured code, how the hell could you NOT know if you had a file variable or not. Obviously something that you and the previous posters want to do that I just dont grok?!? Good question Ross. DesignBais has an Include item for all of their common. I'm trying to expand my understanding of how data is flowing from one event and module to another. When I set something 'here' can I expect it to come out 'there'? So I wrote a program that parses the common block, extracts all variables, then it creates another program that writes all of those variables to a logfile in a structured format. |
#9
| |||
| |||
|
|
In generalized routines, there's a good reason to. Fi, in our web RAD, the user can save state variables, which of course have to be written to a file. There's a warning in spades not to put file vars (also, in this case, @AM delimiters) in the state array. Would be nice to parse the array for filevars, which, as it turns out we can't do because this is uv and the STATUS instruction drops to TCL on illegal variable. I guess we could do EXECUTE 'CHECK' passing the variable in common and examining the CAPTURE! Overhead would be terrible. |
#10
| |||
| |||
|
|
"Chandru Murthi" wrote: In generalized routines, there's a good reason to. Fi, in our web RAD, the user can save state variables, which of course have to be written to a file. There's a warning in spades not to put file vars (also, in this case, @AM delimiters) in the state array. Would be nice to parse the array for filevars, which, as it turns out we can't do because this is uv and the STATUS instruction drops to TCL on illegal variable. I guess we could do EXECUTE 'CHECK' passing the variable in common and examining the CAPTURE! Overhead would be terrible. Chandru, I agree that there is undesirable overhead in any method that detects file vars. Coming back to what Ross said, this is a developer tool, we have access to the source, there's no reason why we can't do our fact finding in development/test mode. Consider the approach I mentioned where one or more initial runs in dev/test mode would do the investigation, and the production mode would not attempt to detect var type. T |
![]() |
| Thread Tools | |
| Display Modes | |
| |