The dialect 'Vulcan' requires a reference to the runtime DLLs

This forum is meant for questions and discussions about the X# language and tools
fxsharp

The dialect 'Vulcan' requires a reference to the runtime DLLs

Post by fxsharp »

Chris, thank you. Got it working. Had to change the Platform target to x86 and add several more references.
fxsharp

The dialect 'Vulcan' requires a reference to the runtime DLLs

Post by fxsharp »

wriedmann, yes, I do understand those concepts. My experience with compilers is limited though. Watcom and MSC for DOS, but that was to compile existing FPD libraries with small tweaks, never wrote any DOS C apps. MSVC back in the day to modify and recompile third-party apps once again. Some C noodling in Linux, a few small programs I've written, but in Linux I mostly modify existing packages and do some kernel hacking here and there. I've also compiled and rolled out full distros for embedded systems, but that's not really programming. Just a tiny bit of Clipper and xHarbour. That's pretty much it.
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

The dialect 'Vulcan' requires a reference to the runtime DLLs

Post by wriedmann »

Hi Jorge,

now that you application compiles and works: where do you think to need some explanations or informations?

Of course X# (and the entire .NET world) is a completely different beast when compared to to Clipper and xHarbour.
VO was a big step forward when compared to these DOS languages, and it was really a shock for me, even if my background before Clipper was Cobol and C (writing DOS, Unix and Novell Netware programs).
And again the step from VO to .NET was big again for me - maybe because I'm not more in the age of 20, and because I need to understand what is going on.
Therefore I can understand how big the "culture shock" must be for someone that comes directly from Clipper to X#....
If you would like to see the speed difference between typed and untyped variables, try this code (needs VO or Vulcan dialect and the X# runtime):

Code: Select all

function Start(  ) as void
local nWeak
local nStrong as int
local dStart as DateTime

System.Console.WriteLine("Starting, non typed")
dStart := DateTime.Now		
for nWeak := 1 to 10000000
  nop
next
System.Console.WriteLine("Terminated, non typed, duration " + ( DateTime.Now - dStart ):ToString() )
	
System.Console.WriteLine("Starting, typed")
dStart := DateTime.Now		
for nStrong := 1 to 10000000
  nop
next
System.Console.WriteLine("Terminated, typed, duration " + ( DateTime.Now - dStart ):ToString() )
	
return
Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
fxsharp

The dialect 'Vulcan' requires a reference to the runtime DLLs

Post by fxsharp »

wriedmann, thanks for the links. I've been rushing things because I'm on a 30 day trial of DevExpress and Syncfusion and I want to be able to populate grids and list boxes. It will probably be better to spend more time learning the ropes then ask for another trial period. I tried your sample, here's what I got:

Starting, non typedntinue...
Terminated, non typed, duration 00:00:00.6469739

Starting, typedo continue...
Terminated, typed, duration 00:00:00.0210397

Yes, typed is much faster by 30.75 times. That is one reason I like C so much.
User avatar
wriedmann
Posts: 3755
Joined: Mon Nov 02, 2015 5:07 pm
Location: Italy

The dialect 'Vulcan' requires a reference to the runtime DLLs

Post by wriedmann »

Hi Jorge,

IMHO speed is always an issue, but it is not the most important one.
The most important is that the compiler is able to do type checking at compile time, so the errors don't show up at runtime.
Please look at this code:

Code: Select all

function Start( ) as void
local nWeak			
local nStrong as int
	
nWeak := 0
nWeak += "Hello X#"
	
nStrong := 0
nStrong += "Hello X#"

return
Again, because of untyped variables, this code needs the runtime and VO/Vulcan dialect.
The code using the untyped variable will compile, but fail at runtime.
The code using the typed variable will show up the error at compile time.

Wolfgang
Wolfgang Riedmann
Meran, South Tyrol, Italy
wolfgang@riedmann.it
https://www.riedmann.it - https://docs.xsharp.it
Post Reply