It is currently Mon Sep 23, 2019 4:44 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Noob question, just starting.
PostPosted: Fri Jul 12, 2019 8:34 pm 
Offline
User
User

Joined: Wed Jul 10, 2019 4:38 pm
Posts: 14
Hello. I learned Basic on a TSR-80, yes I'm old. In recent years I've tried my hand at all variations of C, and for some reason, just cannot get a grasp of it. About 5 years ago, I wanted to make a program for work to track tasks and inventory. I used Visual Basic, and it was a huge pain. But, in the end, it worked, but was over 12 Meg when completed, and had a lot of strange behavior. 2 days ago, I downloaded the free version of Pure Basic and have a nearly fully functional program that runs beautifully, and a very small size. Oh, and a crap ton faster.
But before I buy PureBasic and expand this program, can someone answer a couple questions?
1. VB has try for error trapping, does PureBasic have something like this?
2. Does it have a live debug so I can watch functions and variables as they change?


Top
 Profile  
Reply with quote  
 Post subject: Re: Noob question, just starting.
PostPosted: Fri Jul 12, 2019 11:33 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3056
Location: Boston, MA
1. VB has try for error trapping, does PureBasic have something like this?
Not really. The OnError compile option will give you access to the offending line in your debugged executable. But, the code is not safe to continue.
2. Does it have a live debug so I can watch functions and variables as they change?
Absolutely. Use the integrated IDE debugger and step through code and watch variables or write to debug window or view variable states. lots of debug support. More than VB6. Especially helpful is the memory viewer.

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: Noob question, just starting.
PostPosted: Sat Jul 13, 2019 12:12 am 
Offline
Addict
Addict
User avatar

Joined: Tue Nov 09, 2010 10:15 pm
Posts: 1529
I think someone made some macros to mimic the try-catch... Searching might get you something. (Try Google, if the search box can't do it.)


Top
 Profile  
Reply with quote  
 Post subject: Re: Noob question, just starting.
PostPosted: Sat Jul 13, 2019 3:36 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Apr 10, 2017 6:17 pm
Posts: 269
Location: Germany
shadowvox wrote:
1. VB has try for error trapping, does PureBasic have something like this?


It is definately different and i often have to write my own custom error handling during development A try/catch construct in other languages can be quicker to do during development, but with clean development, you have to write your custom error handling anyway. Having some generic try/catch error handler blow a register dump and a sourcecode reference into a customers face is really not what they should ever see ;)

From my experience, its a bit more work in PB, but it should be done anyway if you want to deliver a solid product your end users want to use. But if you really want to, you could imitate the usual try/catch handling with your own error handler.

shadowvox wrote:
2. Does it have a live debug so I can watch functions and variables as they change?


Yes. Purebasic comes with 3 different debuggers where one runs inside the IDE, one standalone GUI debugger and one command line debugger IIRC (something i never use personally).

In general - PureBasic is a LOT more advanced than VB or VBA. VB ist just the glorified extension of their (office) scripting language environment (IMHO).

_________________
webpage


Top
 Profile  
Reply with quote  
 Post subject: Re: Noob question, just starting.
PostPosted: Sat Jul 13, 2019 5:10 am 
Offline
Addict
Addict
User avatar

Joined: Tue Nov 09, 2010 10:15 pm
Posts: 1529
Speaking of debugging tools, we also get the wonderful profiler that freak gave us. It shows you how much each function is used, etc. When trying to speed up a multi-function routine, this is a godsend.


Top
 Profile  
Reply with quote  
 Post subject: Re: Noob question, just starting.
PostPosted: Sun Jul 14, 2019 1:30 pm 
Offline
User
User

Joined: Wed Jul 10, 2019 4:38 pm
Posts: 14
Thank you all very much for your help.


Top
 Profile  
Reply with quote  
 Post subject: Re: Noob question, just starting.
PostPosted: Mon Jul 15, 2019 7:19 pm 
Offline
User
User

Joined: Wed Jul 10, 2019 4:38 pm
Posts: 14
I'm stunned! The program I wrote in VB 2012 was over 12Meg in size. The same program written in PureBasic is 152K


Top
 Profile  
Reply with quote  
 Post subject: Re: Noob question, just starting.
PostPosted: Mon Jul 15, 2019 7:35 pm 
Offline
Addict
Addict
User avatar

Joined: Wed Dec 23, 2009 10:14 pm
Posts: 3056
Location: Boston, MA
Haha, surely you are not stunned.
This is the difference with compiled and managed software.
Now do Python or Javascript. :idea:

_________________
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum


Top
 Profile  
Reply with quote  
 Post subject: Re: Noob question, just starting.
PostPosted: Mon Jul 15, 2019 10:50 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jul 03, 2003 6:53 pm
Posts: 1278
Location: England
skywalk wrote:
Now do Python or Javascript. :idea:
If it only requires Python's standard library and it's compiled with PyOxidizer it will be around 20mb.

This is still little more than a speck with modern HDD sizes/costs and download speeds though.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye