You are doing a great job, Paul!
New Features Request:
1 - Simple classes. If it was like a UDT with functions it would be all I need.
2- Winsock wrapper.
Thanks.
I'm sure Paul will speak to this, but from what he's mentioned before, EBasic will probably not have object-oriented features. Of course, he has the right to change his mind. :)
You might want to check out Aurora, which is Paul's object-oriented language. It's similar to C++, but easier to get into.
I'd like to have the ability to set a default target. I do a console something or other every now and then but nearly always I want to do a windows program. So it would be real nice if there was an option to make that the default. Probably others would like to set console app as the default.
Barry
Quote from: barry on December 04, 2006, 09:36:44 AM
I'd like to have the ability to set a default target.ÂÃ, I do a console something or other every now and then but nearly always I want to do a windows program.ÂÃ, So it would be real nice if there was an option to make that the default.ÂÃ, Probably others would like to set console app as the default.
Barry
This option to configure a default target would really be convenient if it was available from the IDE menubar.
It just occurred to me that an even better way to specify the type of executable, windows, console, etc would be with a directive in the code itself.
Barry
This thread reminded me of Paul's plans for IBPro 2.0, so it would be nice if he can tell us what parts of those plans will perhaps appear in EBasic. I am primarily thinking about a nice implementation of the event model where one would use commands like:
ON BUTTON Button1 @CLICK CALL Button1ProcedureOrFunction(parm1, parm2,...,parmn)
ON LABEL Label1 @ENTER CALL Label1EnterProcedure()
Barney
Most of what was planned for 2.0 was implemented with Aurora. The CWindow class has all of those OnXXX handlers.
However I should note that many things are in the works for Emergence BASIC. Some things you will see within a version like enumerations and unions, which I am porting from the Aurora parser. Obviously the IDE is quite different and will be even more so when the lexer for scintilla is finished.
Quote
It just occurred to me that an even better way to specify the type of executable, windows, console, etc would be with a directive in the code itself.
Wouldn't work for projects where you can have hundreds of source files. Maybe for a lesser language that only supported single file compiling with no options, no import libraries, no static libraries, etc. Besides you only have to pick the target once, it does save all of your choices for successive compiles.
Some might ask why have a console mode at all, well if you are writing a true text mode application for say a CGI application then you want STDIO to be able to be redirected. Something you can't really do easily when Windows gets involved. A windows executable doesn't get assigned standard input/output handles by the OS.
Paul.
It could work if it was in the file with the $main directive.
I'm glad the console mode is there. It's a lot easier to do useful little tools there when they're needed.
Having to select the target is a pretty minor irritation most of the time but at times such as when you want to try out all the example programs looking for a certain one it's a serious pain in whichever part of the anatomy you choose to refer to.
Now that I'm starting to use projects I've run into another irritation: with a project it asks me every time if I want to save the source file before it compiles. Without a project it doesn't. This would be another good place to let us set a default action or at least let it save automatically.
Barry
I guess it is a matter of preference. But it is something I will look into changing.
Some other upcoming changes include allowing alternate forms of the END directives. To be more compatible with other BASICs Emergence, in V1.6, allows using END SUB, END WHILE, etc. The single word form is still allowed of course to remain compatible with IBasic Pro.
I know, it is a small change, but important for users converting their code from other languages ;)
Also I am working on simple sound generation, for both Aurora and Emergence, which is something Windows sorely lacks. The start of which is a Sound command that allows specifying channel, frequencey and duration. And I will be expanding that to allow specifying ADSR envelopes.
Later,
Paul.
I have a modest request.ÂÃ, Two pairs of buttons.ÂÃ, One indent, un-indent.ÂÃ, The second remark, un-remark.
Thanks,
Alan Elliott
QuoteMost of what was planned for 2.0 was implemented with Aurora. The CWindow class has all of those OnXXX handlers.
I am really looking forward to any improvements of EBASIC's messaging system ;D
QuoteThe start of which is a Sound command that allows specifying channel, frequencey and duration.
Am I correct in assuming this will be able to be used to create retro sounds/music for games? If so that will be great.
Acelli,
The indent/unindent function is there; select a few lines of code and press TAB for indent or SHIFT-TAB for unindent.
The remark/unremark function though is NOT implemented (at least not to my knowledge) and I agree with you that it is greatly missed!
Finally, Paul, do not touch the console mode! I do most of my programming in console mode because I don't really care about a GUI! It's nice to know that the GUI functionality is there but the console mode in the best and quickest way of achieving results.
John
QuoteThe remark/unremark function though is NOT implemented (at least not to my knowledge) and I agree with you that it is greatly missed!
Yes, but it is very comfortable and simpler to use the characters \* *\ for remarking whole blocks of text.
bye
Sergio
Good point Sergio!
(incidentally, it is /* and */, i.e. regular, not inverse slash)
Hi JP ..
I was curious about this guy in Greece, who was into all the scientific stuff - so I looked you up and read your paper on Greek Railways ..ÂÃ, :)
It's amazing how similar our careers have been .. I started in Operational Research with an Electricity Board - moved into Computing and Engineering IT - then To British Railways Research in simulation and economics - and finally to Staffordshire University in the Computing Department.
I'm retired now - but how close is that?ÂÃ, :) :)
best wishes, :)
Graham
Graham,
Wow! You sound like a sister soul to me! And how nice of you to drop a line.
I an a Civil Engineer (from the National Technical University of Athens) and hold an MSc degree in Transportation and a PhD degree in Environmental Health both from Northwestern University (Chicago). My research revolves around the application of modeling and simulation principles in the solution of environmental end energy issues of technological problems (just ran out of breath)! The funny thing is that, just like you, I have now found a home at an IT department!
Incidentally, you may find a couple of OR journal papers of mine at www.sciencedirect.com ; one has a nice algorithmic component and may be of interest.
Well, no kidding, eBasic gets people together doesn't it! Paul, if we can convince some female programmers to post messages here, you could turn this into a ...dating service so that bachelor members could two at the price of one!
:D
Thanks for the replies. I already knew about the TAB, SHIFT-TAB and the block comment /* */. I have just become accustom to using these two pairs buttons in other editors. The subject was "New Features Request", so if other people find these two pairs of buttons useful, speak up and maybe Paul will include them in version 1.6 ;)
Thanks,
Alan Elliott
One hopefully minor suggestion is for the "find" and "find/replace" tools to remember the last entered text and better still have a dropdown of current session entered text.
Great work in developing Ebasic by the way!
Paul,
I don't know if anyone has made this request yet so here it is:
Can you make the Find/Replace function in the Ebasic IDE work like that in Aurora's IDE - where it automatically goes to find the next instance after your "replace".
That functionality comes with the Scintilla addition.
Please add this to the request:
Remove Floor and Ceiling and replace them with LBound and UBound.
I use Floor and Ceiling in my RPG as literally the Floor and the Ceiling.
Somewhat drastic request isnt it Jonathan? Remove core commands lol. Would it not be easier to rename your functions?
Lewis
Floor and Ceiling are math commands, and are standard in almost all languages. They have nothing to do with bounds ;)
LBound and UBound are traditionally used in BASIC languages to find the upper boundary and lower boundary of an array (traditional BASIC allows you to specify an other-than-zero lower bound). Those names would confuse people. You can misspell your names as long as you don't forget: I used sward once when sword was taken with the variable type. Or use a prefix like _floor and _ceiling. There are lots of creative options.
PS: I noticed this forum now has spell checking. No chance of it coloring code though, hmm ;)?
Edit - nevermind, that's just firefox 2...
Hm, I never knew Floor and Ceiling were common math objects.
I wonder why I never ran across that before when compiling my RPG's.
funky.
Learn something new every day.
I ended up using sFloor and sCeiling in my code, better off that way anyway.
I too think LBOUND and UBOUND are not appropriate names for the FLOOR and CEILING functions.
Apart from their occasional (i.e. in some BASIC dialects) usage in arrays, "LBOUND" and "UBOUND" would rather refer to optimization problems (as in upper and lower bounds of an objective function, constraints etc).
BTW happy new year eBasic lot!
Since John is in this thread, I would love to see a business Math and/or Stat pack added to EBasic with functions such as NPV, Std Deviations, Averages, etc. being added.
Ke to Xrono John! (Greek New Year wish) and to all on this forum
Dennis
Dennis,
If any other users wish to join forces, on my part I would gladly convert and enhance my random number generation package written in another Basic dialect.
As an interim solution to users wishing to employ math and stat function, the fbmath library of FreeBasic is available as a freeware and its source easy to translate to eBasic:
http://sourceforge.net/projects/fbmath/ (http://sourceforge.net/projects/fbmath/)
John
I don't recall, does sourceforge allow binaries also or only code?
Thanks John - will look at the library suggested and see if I can find the time to convert and make available.
QuoteI don't recall, does sourceforge allow binaries also or only code?
To the best of my knowledge Jonathan, the concept of open source supported by SourceForge requires that source must be made available.
Dennis
Folks,
The FBmath download
fbmat043.zip
includes ALL source code nicely organized in folders (curfit, equation, fmath, fourier, integral, largeint, matrices, optim, plot, polynom, proba, random, stat & strings). The code is very clean, well structured and nicely commented as in sample below
DECLARE FUNCTION RanGen3 AS DOUBLE
' Returns a random number in (0,1)
' ------------------------------------------------------------------
' Global variables
' ------------------------------------------------------------------
DIM SHARED GaussSave AS DOUBLE ' Saves a Gaussian number
DIM SHARED GaussNew AS INTEGER ' Flags a new calculation
' ******************************************************************
OPTION EXPLICIT
FUNCTION RanGaussStd AS DOUBLE
' ------------------------------------------------------------------
' Computes 2 random numbers from the standard normal distribution,
' returns one and saves the other for the next call
' ------------------------------------------------------------------
DIM AS DOUBLE R, Theta
IF GaussNew = 0 THEN
R = SQR(-2 * LOG(RanGen3))
Theta = TwoPi * RanGen3
RanGaussStd = R * COS(Theta) ' Return 1st number
GaussSave = R * SIN(Theta) ' Save 2nd number
ELSE
RanGaussStd = GaussSave ' Return saved number
END IF
GaussNew = NOT GaussNew
END FUNCTION
FUNCTION RanGauss(Mu AS DOUBLE, Sigma AS DOUBLE) AS DOUBLE
' ------------------------------------------------------------------
' Returns a random number from a Gaussian distribution
' with mean Mu and standard deviation Sigma
' ------------------------------------------------------------------
RanGauss = Mu + Sigma * RanGaussStd
END FUNCTION
This should give you a good idea.
Yes. It does look interesting. I've downloaded it and already translated a few functions into EBasic. Now, if only I can find some time... ::)
Barney
Unfortunately, EBasic doesn't support inline comments with the single quote at the moment.
So you have to go through the code and move those commends to either above or below but on there own lines.
Very nice to have item though for converting :)
Now, if search/replace would be able to take a " '" and add a chr(13) or chr(10) to the begining (carraige return), it would simplify things :)
Hmmm.. it seems you are wrong on that one, Jonathan. This compiles and runs properly:
' ******************************************************************
' Mathematical constants
' ******************************************************************
CONST Pi = 3.141592653589793 ' Pi
CONST Ln2 = 0.6931471805599453 ' Ln(2)
CONST Ln10 = 2.302585092994046 ' Ln(10)
CONST LnPi = 1.1447298858494 ' Ln(Pi)
CONST InvLn2 = 1.442695040888963 ' 1/Ln(2)
CONST InvLn10 = 0.4342944819032518 ' 1/Ln(10)
CONST TwoPi = 6.283185307179586 ' 2*Pi
CONST PiDiv2 = 1.570796326794897 ' Pi/2
CONST SqrtPi = 1.772453850905516 ' Sqrt(Pi)
CONST Sqrt2Pi = 2.506628274631001 ' Sqrt(2*Pi)
CONST InvSqrt2Pi = 0.3989422804014327 ' 1/Sqrt(2*Pi)
CONST LnSqrt2Pi = 0.9189385332046728 ' Ln(Sqrt(2*Pi))
CONST Ln2PiDiv2 = 0.9189385332046728 ' Ln(2*Pi)/2
CONST Sqrt2 = 1.414213562373095 ' Sqrt(2)
CONST Sqrt2Div2 = 0.7071067811865476 ' Sqrt(2)/2
CONST Gold = 1.618033988749895 ' Golden Mean (1 + Sqrt(5))/2
CONST CGold = 0.3819660112501052 ' 2 - Gold
' ******************************************************************
' Mathematical constants
' ******************************************************************
PRINT "Pi = ",Pi
PRINT "Ln2 = ",Ln2
PRINT "Ln10 = ",Ln10
PRINT "LnPi = ",LnPi
PRINT "InvLn2 = ",InvLn2
PRINT "InvLn10 = ",InvLn10
PRINT "TwoPi = ",TwoPi
PRINT "PiDiv2 = ",PiDiv2
PRINT "SqrtPi = ",SqrtPi
PRINT "Sqrt2Pi = ",Sqrt2Pi
PRINT "InvSqrt2Pi = ",InvSqrt2Pi
PRINT "LnSqrt2Pi = ",LnSqrt2Pi
PRINT "Ln2PiDiv2 = ",Ln2PiDiv2
PRINT "Sqrt2 = ",Sqrt2
PRINT "Sqrt2Div2 = ",Sqrt2Div2
PRINT "Gold = ",Gold
PRINT "CGold = ",CGold
DO:UNTIL INKEY$ <> ""
END
Actually I am already well on the way with changing the math.bi file. There are some small issues, which FreeBasic handles differently than EBasic but nothing that could not be solved relatively easily and quickly. Also, some of the functions are already implemented in EBasic.
Barney
Odd, ok, will re-install ebasic from scratch them, I probably have mixed dll's or something.
I can't get inline comments to compile without errors on my version. *shrugs* typically something stupid on my pc.
Barney,
Make sure you post a message, possibly on a new thread, when you are done with conversion to eBasic of any of the modules of fbmath.
I was thinking, if we get a group of people to collaborate on translating fbmath to eBasic (not that the translation is a difficult task, mostly because I imagine that many of us may not have much free time), we could let Paul include it as part of the standard eBasic package (it would always have to be a freeware component though)!
Judging from the appeal of fbmath, this might make eBasic a more attractive product to quite a few people.
Hey - well done guys. I like John's suggestion to have a MathPac as a freeware download add-on to EBasic.
Dennis
Maybe Paul himself would like to take on part of the task of translating fbmath to eBasic.
That should keep him off the night life for a while ;D
Quote from: paravantis on January 02, 2007, 11:38:53 AM
Barney,
Make sure you post a message, possibly on a new thread, when you are done with conversion to eBasic of any of the modules of fbmath...
I was thinking, if we get a group of people to collaborate on translating fbmath to eBasic (not that the translation is a difficult task, mostly because I imagine that many of us may not have much free time), we could let Paul include it as part of the standard eBasic package (it would always have to be a freeware component though)!
Judging from the appeal of fbmath, this might make eBasic a more attractive product to quite a few people.
I've requested that Vikki & GWS (Graham) create either a sticky topic or new heading in "The Roundtable" area.
You are right - if a bunch of us start working on individual files, we can convert the whole thing in no time.
I'm a text guy, and don't know a cosine from an asymptote, so if you guys run into a snag and need some help, you'll probably have to look up this guy for some pointers:
http://www.theonion.com/content/node/38718
Quote from: Jerry Muelver on January 02, 2007, 06:59:04 PM
...you'll probably have to look up this guy for some pointers: http://www.theonion.com/content/node/38718
He's busy right now, but perhaps in two years, he'll have more time. ;D
Quotehttp://www.theonion.com/content/node/38718
It was SOOO good, I could not resist forwarding the link to a couple of old friends in the US...