05-22-2025, 03:22 PM
it would require a preprocessor. to catch every single call to the target subprogram. then notice if the single argument is a vls variable. or fixed-length string. or a literal.
this is because string technically is a pointer. if the subprogram is called with literal string to pass to it. the system has to make a copy of that string anyway. to work with it inside the subprogram. this will be expected by most people. if a string variable is passed instead. it could cause more trouble. because its value could be changed inside the subprogram. unless the programmer is willing to force the copying and extra memory spent. work with the copy instead. if the value going into the subprogram shouldn't be changed.
in the first post of this thread. the variablewassent% has to be forced honesty by the programmer as smcneill pointed out. otherwise it needs observation outside the compiler.
if this is the only subprogram that requires this special treatment. it would be easy to write a basic program. actually in any programming language. that reads in the basic code. looks only for that call of subprogram. then make necessary adjustments by adding basic code to the output file. then use the output file.
this is because string technically is a pointer. if the subprogram is called with literal string to pass to it. the system has to make a copy of that string anyway. to work with it inside the subprogram. this will be expected by most people. if a string variable is passed instead. it could cause more trouble. because its value could be changed inside the subprogram. unless the programmer is willing to force the copying and extra memory spent. work with the copy instead. if the value going into the subprogram shouldn't be changed.
in the first post of this thread. the variablewassent% has to be forced honesty by the programmer as smcneill pointed out. otherwise it needs observation outside the compiler.
if this is the only subprogram that requires this special treatment. it would be easy to write a basic program. actually in any programming language. that reads in the basic code. looks only for that call of subprogram. then make necessary adjustments by adding basic code to the output file. then use the output file.

