Full Version: Whats The Opposite Of Hard Coded?
UtterAccess Discussion Forums > Microsoft® Access > Access Modules
zocker
Is it er....soft coded...doesn't quite ring true!

Thanks

Z
Kamulegeya
may be dynamic.....
zocker
could be.....any more calls from the floor?

Thanks K!
tina t
well, i guess it may depend on the context it's used in. in my experience with the term hardcoded, it means "real" or "hard" values written into code, as opposed to values acquired at runtime. for instance:

MyVariable = "dog"

is hardcoded, while

MyVariable = Me!txtAnimal

is acquired at runtime, wholly dependent on the value in the referenced txtAnimal control. as you can see, hard-coding values makes your code less flexible, requiring more maintenance - every time the business process changes, the code must be rewritten to support the change.

there are times when hard-coded values are appropriate - when you don't want the values to be open to easy change. usually those values are written to constants, at the top of a module where they're easier to find when you're looking at the code, as well as being available in the scope of the module.

hth
tina
zocker
Thanks for your reply Tina! I have the concepts as you suggest, but I need a term to denote 'not - Hard Coded' but as I said, 'Soft coded' doesnt quite make it somehow.

The context is these lines of comments from a PHP page.


echo "<br />" ; // or php can add dynamically coded line breaks or other HTML tags by 'echoing' text. HERE I WANT TO SAY SOFT CODED OR SOMETHING
echo "<br />PHP line break" ; //
echo "<br />" ;

When I put this code in UA code tags the page 'broke'- that post is in th UA bin now.

Thanks Tina!
theDBguy
Hi,

I think a combination of both ideas might sound better, such as:

"or php can dynamically add line breaks at runtime...

Just my 2 cents... 2cents.gif
tina t
oops, i missed the thrust of your inquiry, and gave an answer more geared to a VBA newbie - sorry, hon! i think both Kamulegeya and DbGuy have made good suggestions for you. tina :)
zocker
@db thanks, thats getting closer!
@tina..after 14 years of this stuff, everyday still makes me feel like a noob!

Thanks muchly both!

Z
gemmathehusky
hardcoded

parameter-driven

(or dynamic, as suggested above)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.