September 09, 2009
Announcing WinWrap® Basic Compile Option
Polar Engineering is pleased to announce the immediate availability of a Compile Option for WinWrap® Basic Version 10.
With the WinWrap® Basic Version 10 Compile Option you can speed up WWB.NET code by 100 times, or more.
WinWrap® Basic Compile Option Features
- Compile speed-critical WinWrap® Basic library projects
- Utilize the full power of VB.NET code
- Access application defined language extensions
- Call compiled code directly from WWB.NET scripts
- Call compiled code from both COM and .NET host applications
- Call compiled code via delegates
- Use any of thousands of .NET Framework Classes
Where script execution speed is critical, you now have the option of compiling the script as a WWB.NET/Compiled library. Click on one of the links below to evaluate the WinWrap® Basic Compile Option.
When to Use Compiled Code Libraries
WinWrap® Basic's compile option is a good choice for compute intensive code, speed critical code routines.
- Maximum execution speed is critical
- Compiled computations are guaranteed to be fast
- Or, the computations can be broken into chunks
When to Use Scripted Code Modules
WinWrap® Basic's WWB.NET scripting development and execution environment has been optimized for script writers and users.
- Allows users to pause and halt executing scripts
- Cooperatively multitasks with the foreground task
- Optimized debugging features
- Call compiled code libraries
How the WinWrap® Basic Compile Option is Implemented
WinWrap® Basic implements the WWB.NET/Compiled language using Microsoft's VB.NET compiler component. A WWB.NET/Compiled project is compiled on demand the first time it is used. Changes to the project cause the code to be recompiled on demand the next time it is used. The compiled code is completely managed by the WinWrap Basic environment. Additionally, the language extensions added by the application are available from a WWB.NET/Compiled project.
WinWrap® Basic Compile Option Example
- WinWrap® Basic designates compiled code with the '#Language "WWB.NET/Compiled" directive.
Attribute CompileId = "32673FB89ACD4AE686F2D5021E13F644"
- The NthPrime function calulates the nth prime, returning it to the calling routine.
Private primes As ArrayList
Public Function NthPrime(ByVal limit As Integer) As Long
primes = New ArrayList
Dim n As Long = 1
Do Until primes.Count >= limit
n += 2
If IsPrime(n) Then primes.Add(n)
Private Function IsPrime(ByVal n As Long) As Boolean
Dim limit As Long = CLng(n ^ .5)
For Each prime As Long In primes
If prime > limit Then Exit For
If n Mod prime = 0 Then Return False
- Refer to the project announcement to learn more about WinWrap® Basic Version 10 projects.
Speed up WWB.NET code by 100 times, or more, with the WinWrap® Basic Version 10 compiler option. Where execution speed is critical WinWrap® Basic Version 10's new compile capability will provide the solution.
Copyright Polar Engineering, Inc.