

Components of a system

Resource layer added, allowing components to interact in new ways
It is a collection of interacting objects: the interface between the objects is what is important, not the particular language in which the objects are written, or even what machine the objects reside on. Destiny realizes the importance of Java and has definite plans to provide support for it in the near future.
The current rsl syntax is just one way of visualizing and expressing resource - message interactions.
Main
{
out.print("Hello, World");
}
|
Main
{
List unsortedl, sortedl;
unsortedl.append("a", "f", "zz", "Xy", "A", "c");
out.print("UNSORTED:", unsortedl);
sortedl = unsortedl.Sort();
out.print("SORTED: ", sortedl);
}
|
The output of this program is:
UNSORTED: a f zz Xy A c SORTED: A Xy a c f zz
// split.rsl // Demo of the "split" method of String // - takes a String or an Integer // - it returns a List of the elements of the String separated by // the argument (in this demo, "$" - could just as well be "\n" // for example) // - a String argument is a delimiter // - an Integer argument indicates a size // - also note assignment to a List // // Demo of the "distribute" methods of String: // - two versions: DistributeType, DistributeAll // - DistributeType(type, method, arg1, ..) // - apply method, args only to resources of type type // - DistributeAll(method, arg1, ..) // - apply method, args to all resources. // // RFH 11/27/95 // Main { String a; List x, y; a = "This is part 1.$This is part 2.$This is part 3."; // break the String into sub-strings at each "$". // b will then contain three new String resources. x = a.split("$"); // To each String in the new List (there will be 3) // send the message "prepend" with argument "> " x.distributeType(String, "prepend", "> "); out.print(x, endp); // print the List // break the String into sub-strings, each of length 4 y = a.split(4); // For all resources in the List (no matter what type) // call the method "prepend" with "> " as the argument. // In this case, there are only Strings in the List, so // this is identical to the previous use of DistributeType. // Just a different way to do it. y.distributeAll("prepend", "> "); out.print(y, endp); // print the List } |