An EVAL statement equivalent would certainly be very useful for rules-based systems or any systems that use interpreters such as screen runners etc. that need to do complex validation based on soft coded rules, e.g. as part of a screen or table definition. Unfortunately it's not already baked into the language.
In uv I've only found two good ways to do it: 1. wrote my own expression interpreter/scripting language. Like most such things it has grown over the years but I use it in various products now it's there. But also.. 2. I worked with a system for custom manufacturing that created dynamic calculations for costings, manufacturing specs, cutting lists etc. based on part definitions and pseudo-variables maintained by their technical department. Whenever required, these calculations were converted into a set of temporary I Descriptors, source values placed into @record, @User0 etc. and then simple LISTs and ITYPE() functions used to process these. The nice thing is the way I Descriptors can reference each other, so each expression/variable etc. can be created as a separate I Descriptor, so it's really easy to see what's going on and very flexible. Sounds a bit cludgy as I describe it but in reality remarkably quick, none of the problems with Basic caching and easy to debug. Wish I'd designed it. Brian -----Original Message----- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Wjhonson Sent: 24 August 2012 20:19 To: u2-users@listserver.u2ug.org Subject: Re: [U2] Variable Interpolation Are you saying this would run *in* a BASIC program? Or at TCL? -----Original Message----- From: Rex Gozar <rgo...@gmail.com> To: U2 Users List <u2-users@listserver.u2ug.org> Sent: Fri, Aug 24, 2012 12:16 pm Subject: Re: [U2] Variable Interpolation The OP is describing an "evaluate" function that executes code on the fly based on variable values. See JavaScript's eval() function for a similar concept. For example, maybe I have some variables like WIDGET and EVENT, and I want to dynamically generate the label to an internal subroutine: EVALUATE('GOSUB ':WIDGET:'.':EVENT) rex _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users _______________________________________________ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users