Page 1 of 2

Re: 2 scripting lanuages ???

PostPosted: Thu Mar 29, 2018 2:38 pm
by cncdrive
I think it will be helpful to have VB language for those who come from the Mach3 world.
On the UCCNC code side to make it possible to compile both languages is just a few extra lines of codes, because the .NET framework has both compilers and the .NET 4.0 supports dynamic variables, so it is about 15-20 lines of extra code only in the UCCNC, it is not a heavy extra project to have both compilers in work...

What do you mean by macro editor and debugger?

Re: 2 scripting lanuages ???

PostPosted: Thu Mar 29, 2018 7:55 pm
by cncdrive
Terry, I agree, but because for a long time many people coming from M3 were asking for VB macroing we through it is time to add it and since it took only a few hours of coding to add and to test it and made the application not much more complex we added this now.

Re: 2 scripting lanuages ???

PostPosted: Thu Mar 29, 2018 10:10 pm
by cncdrive
If the #VB word is in the first line of any macro then that macro is compiled with VB otherwise it is compiled C#.

Re: 2 scripting lanuages ???

PostPosted: Thu Mar 29, 2018 11:16 pm
by Robertspark
How much different is Cypress VB {Mach3 variant} from VB?

Re: 2 scripting lanuages ???

PostPosted: Thu Mar 29, 2018 11:44 pm
by cncdrive
Hi Rob,

Unfortunatelly I have not much ideas about the Cypress VB syntax. The last time I wrote macro in it was probably 6-8years ago and I fully forgot it's syntax. :(
But the syntax in the UCCNC is Visual Basic, it is the exact same language and syntax as the .NET (Visual Studio) VB language, because the .NET built in compiler is used to compile the macros, but I'm also not using the Visual Studio VB compiler much, I'm more a C language guy.
Dezsoe is the VB expert. I only made some very simple VB macros for testing the compilations and the more serious tests were made by Dezsoe, because he is much more familiar with VB than me. His mother language is VB. :)
But again, the compiler itself is guaranteed to be OK, because it is not a compiler we wrote, but the .NET's VB compiler, we only wrote a few lines of codes into the UCCNC to use the already available compiler in the .NET framework.

Re: 2 scripting lanuages ???

PostPosted: Fri Mar 30, 2018 12:12 am
by cncdrive
I'm not at all interested in fully learning or using VB. The last time I used basic to code was on Commodore 64, it was not yesterday. :)
But the option is now there and people who used to program in Visual Studio VB can now use the same programming language and syntax which they like and which they are familiar with.
Usually people who using VB are not using C based languages and vica versa, so we just made things easier for those who code in Visual Studio VB already and also who came from a Mach3 background for those people it will be still easier if they will not have to learn the C syntax if they never coded in C. For me C# and C++ are the programming languages and not the VB, but people are different.
Even if the Mach3 language is not exactly the same as the .NET VB compiler (I'm not sure about the differences), but then still for people who already knows something about the VB general syntax might be easier to convert things than to learn C#. Or at least this is what some people told me is why we made this option. And because it was not hard to add this option we did not have to consider not adding it when it only took a few hours for us to add it.

And the most important is that the #VB is just an option in the UCCNC now, anybody can select to use it or just ignore it and code in C#.

Re: 2 scripting lanuages ???

PostPosted: Fri Mar 30, 2018 1:15 am
by cncdrive
Haha, it's like Iphone or Android phone. :)

Re: 2 scripting lanuages ???

PostPosted: Fri Mar 30, 2018 3:50 am
by ger21
Is it VB.net,or VB script like Mach3?

Re: 2 scripting lanuages ???

PostPosted: Fri Mar 30, 2018 5:50 am
by Robertspark
I've got use to c#, but I can definitely see the advantage of offering both VB and c# especially in offering something else to improve the attractiveness of uccnc and market share.

Like everything I've dabbled with VB in Microsoft excel. (Learnt and forgot it on the fly... Mainly copied and pasted + tweaked)

It would be useful to see a semi complex macro (ie a few lines of code) in c# converted to VB so users could see what is involved.

I found VB cypress fairly easy to understand or learn, but I never did a large number of macros with it. C# seemed to be a little more difficult to learn / took longer on the uptake.... The pesky ";" at the end of line in c# generated a lot of errorlog messages for me, where as VB cypress was more about code than format.

It will still be a learning curve from mach3 but probably an easier one plus help gain interest in uccnc where the complaint was ... It's not VB (more than its no longer being developed haha).

Re: 2 scripting lanuages ???

PostPosted: Fri Mar 30, 2018 8:57 am
by dezsoe
Terry,

Could you send that CE code with so much errors? I have only a few Mach macros, but I didn't find any language level problems, only Mach functions that don't exist.