Post
Topic
Board Altcoin Discussion
Re: Nxt Scripts (progress and discussion)
by
colorfish
on 15/02/2014, 02:50:42 UTC
but, what is a nxt scripts?

A simple example (in fact our first "use case") is a script (or perhaps more correctly termed a "program" as we are not actually going to be using a typical "script" language) that pays a dividend to the shareholders of an Asset.

So in pseudo code this might look something like the following:

Code:
var b = get_Balance( );
var n = get_Number_Of_Account_Users( );
if( n > 0 )
{
   var s = b / n;
   if( s > 0 )
   {
      while( true )
      {
         var a = get_Next_Account_User( );
         if( a == 0 )
            break;
         send_Amount_To_Account( s, a );
      }
   }
}

I hope that isn't too confusing.


Thank u for ur answer.
I think I know what is nxt script that u want to create a host
(like V8)to execute some customized code(any protocols or rules) that user write.
Am I right?