Attach scripts to instantiated objects?

This is an odd question, but when you instantiate objects, is there anyway to attatch bits of code (like the one below) to them?

function Update(){ transform.Translate(Vector3.forward * 10 * Time.deltaTime);}

I say odd, because I know I could just attach the script to the object in the inspector I just want to know this for organizations sake.

So I am asking if I can create/add a script as I instantiate a clone of an object.

You're asking about bits of code, and then you're asking about entire scripts. Please clarify what you actually want. There's probably some way to do the former, but I don't know about it, and it sounds like more complexity than you'd want anyway. If you want to add a script, use this:

Technically yes -

You can use the eval command in Unityscript to run strings, so you could have eg

var injectableCode : String;

function Update() {
  eval( injectableCode );

But as eval is slow and it's extremely easy to mess up and not notice with strings, you should stick with AddComponent unless you positively absolutely have to use eval.