Benutzer-Werkzeuge

Webseiten-Werkzeuge


scriptstack

Unterschiede

Hier werden die Unterschiede zwischen zwei Versionen angezeigt.

Link zu dieser Vergleichsansicht

Beide Seiten der vorigen Revision Vorhergehende Überarbeitung
Nächste Überarbeitung
Vorhergehende Überarbeitung
scriptstack [2025/12/15 02:45]
jango [Routines]
scriptstack [2025/12/15 02:50] (aktuell)
jango [Routines]
Zeile 112: Zeile 112:
 <code csharp> <code csharp>
 // define route // define route
-Routine routine = new Routine( +Routine routine = new Routine((Type)null, "Print", (Type)null, "A function to print text");
- (Type)null, "Print", (Type)null, "A function to print text");+
 </code> </code>
  
Zeile 129: Zeile 128:
 listParameterTypes.Add(typeof(ArrayList)); listParameterTypes.Add(typeof(ArrayList));
  
-// define function prototype with many parameters +// define routine with many parameters 
-Routine routine = new Routine( +Routine routine = new Routine((Type)null, "Print", listParameterTypes);
- (Type)null, "Print", listParameterTypes);+
 </code> </code>
  
Zeile 188: Zeile 186:
 <code csharp> <code csharp>
 // register global Sine function // register global Sine function
-HostFunctionPrototype hostFunctionPrototype = new HostFunctionPrototype( +Routine routine = new Routine(typeof(float), "Print", typeof(float)); 
- typeof(float), "Sin", typeof(float)); +manager.Register(routineprintHandler); 
-m_scriptManager.RegisterHostFunction(hostFunctionPrototypetrigHandler);+
 // register global Cosine function // register global Cosine function
-HostFunctionPrototype hostFunctionPrototype = new HostFunctionPrototype( +routine = new Routine(typeof(float), "Read", typeof(float)); 
- typeof(float), "Cos", typeof(float)); +manager.Register(routinereadHandler);
-m_scriptManager.RegisterHostFunction(hostFunctionPrototype, trigHandler); +
-// register global Tangent function +
-HostFunctionPrototype hostFunctionPrototype = new HostFunctionPrototype( +
- typeof(float), "Tan", typeof(float)); +
-m_scriptManager.RegisterHostFunction(hostFunctionPrototypetrigHandler);+
 </code> </code>
  
scriptstack.1765763158.txt.gz · Zuletzt geändert: 2025/12/15 02:45 von jango