Wish Lack of popular builting funtions()... Thoughts...

FERNANDO SILVEIRA

Active Member
Licensed User
I've been learning B4A for a month now and my perception is that it is an amazing versatile language. However, it has been a difficult road for me to follow. My main concern as a former VBA programmer/MS Excel experienced user is the lack of corresponding popular/well known builting functions like LEN(), STR(), VALUE(), TRIM(), SUBSTR() and many others.

I think that the object.function notation used to set/get object attributes (like .put, .get, .length, .size, whatever) is a huge show stopper/delayer. With little/no correspondence with other BASIC dialets. And at the end of the day, B4A stands as a BASIC language, right? I really think that people would become much more productive sooner if these elementar funtions were made part of the B4A core.

Also, relying so much on external created libraries even this external libraries providing some extraordinary solutions for very specific situations, only contributes to confuses the language usability since we lack on quality/standardized documented material.

I know that some of you that had already tracked this learning road would think that I will get used to it some time. I know I will. I just get a little frustated looking for things that would be obvious on other environments but here we have a quite different way to obtain.

I just wished that future B4A buyers would have an easier/less painful way to follow.
 

Erel

Administrator
Staff member
Licensed User
My main concern as a former VBA programmer/MS Excel experienced user is the lack of corresponding popular/well known builting functions like LEN(), STR(), VALUE(), TRIM(), SUBSTR() and many others.
???

B4X:
Dim s As String
Log(s.Length)
'str and value are not required in B4X
s = s.Trim
s = sub.Substring(1, 3)
You should really take some time and watch the video tutorials or read the programming guide.

https://www.b4x.com/etp.html

I think that the object.function notation used to set/get object attributes (like .put, .get, .length, .size, whatever) is a huge show stopper/delayer
Ok. I don't think so. Actually they are very useful as the developer knows that he or she needs to click on the dot button and immediately see the available methods and properties.

And at the end of the day, B4A stands as a BASIC language, right?
The programming language name is B4X. While some of the syntax is similar to VB it is not a VB clone and doesn't try to be.

Also, relying so much on external created libraries even this external libraries providing some extraordinary solutions for very specific situations, only contributes to confuses the language usability since we lack on quality/standardized documented material.
Need more information for this one as it is not clear. My feeling is that you mistakenly used a library such as StringFunctions that is not needed and not recommended.

There is no doubt that if you try to write VBA code in B4X without learning the main concepts then the learning curve will not be smooth.

As I wrote to you in the past, you should go over the guides and the videos. They will save you a lot of time...
 
Last edited:

FERNANDO SILVEIRA

Active Member
Licensed User
You should really take some time and watch the video tutorials or read the programming guide.

https://www.b4x.com/etp.html
Erel, you keep telling me watch this, read that. I can assure you I watch all of your tutorials/more than once just for the record. I even purchased the "B4A Rapid Android App Development using BASIC" book, and finally ask for help in the forums since information is wide spread.

Once again, don't worry. These are not complains. These are just the results of my perception.
They are just wishes and as wishes don't necessarily need to be attended. It would just be good if they were.

Cheers...
 

Johan Hormaza

Well-Known Member
Licensed User
B4X are extremely powerful and very complete tools. Easier to use impossible, in addition there are many examples, videos and snippets of code that solves what you want friend ... Just look for them in the forum, believe me you would get everything you need ..
 

Star-Dust

Expert
Licensed User
Frankly, I do not understand these observations either. And I also come from VB, VbScript, VBA etc .. But I also studied programming languages of other kinds Turbo Pascal, Java, JavaScript, C, etc ....

Your complaints seem to focus on aspects that make the difference between a script (so Office's VBA) and a powerful language.

B4X is not a script, but a language and as such (and I add as all languages and also VB) many expansions are found in libraries (in other languages often paid) other language expansions are added by the parent.
A language does not contain all the possible libraries.

As already said @Erel does not follow VB exactly because in the meantime informatic has evolved, certain methods have been improved.
For example, if I wanted to find MID (String, Start, End), I can tell you it does not exist because as in all modern Basic (and other languages) we use SubString and SubString2. It would be absurd to look for an old command now outdated in a new language.
(do not put a patch of new cloth on an old trousers)

I did not understand the problem in finding and methods object.method. It's a universal system that you find in VB.NEt, in Java, etc. I do not understand why it's not OK in B4A.

VBA that you find in Office is not a language but a script, which does not always resemble VB or VB.NET.

Give a look to other RADs and form a more complete opinion after evaluating today's context of development.

P.S: mine is not a criticism, but only observations :);):p
 
Last edited:

Jeffrey Cameron

Well-Known Member
Licensed User
as a former VBA programmer/MS Excel experienced user
VBA is a sub-set of Visual Basic 4-to-6 depending on your version of Excel/Word. I think a large part of your frustration is moving from the procedural world of VB6 into the fully object-oriented world of B4X.

If you want a more VBA basic-flavored introduction to object oriented BASIC, I suggest you start with one of the many VB6-to-.NET guides a quick Google search will return. I think they may give you a better understanding of how to do things (at least in .NET) coming from VBA ( e.g. from New$ = Mid(Old$, 1, 4) to New = Old.SubString(0, 4) ). I found the transition from VB.NET to B4X to be the easiest one I've had in nearly 40 years of programming.

Just my two cents ;)
 

FERNANDO SILVEIRA

Active Member
Licensed User
Ok. I don't think so. Actually they are very useful as the developer knows that he or she needs to click on the dot button and immediately see the available methods and properties.
You are absolutelly right here. You have an amazing IDE tool, that allows to produce very complex code with ZERO syntax erros. I also agree with you and have to compliment you when you say it is just a matter of click on the dot and the available methods appear.

That's was not my point, B4A could also offer the popular builting functions for those old basic programmers like me as said.

But, wishes... wishes... wishes... ;):):rolleyes:
 

udg

Expert
Licensed User
Hi Fernando,
maybe what a former-VBx programmer could find useful for an head start with B4x is a tool that parses VB code and produces B4x code. As a learning tool, not as a way to develop in a different language and be automatically translated..
I didn't search the Forum, but it's possible that someone did it long time ago.

So, your posting could be more on the "language translation" track than on the "language features" one.

Personally, having used the Basic language only from 1982 to 1985, I can't say that I missed such an help when I first discovered B4x a few years ago..

My 2cent advice: keep investing your time in learning B4x as a language on its own, don't feel compelled to necessarily find a parallelism with VB/VBA.
 

Cableguy

Expert
Licensed User
(I'm about to advocate for the devil, but someone has to...)

Fernando expressed a wish.
If this wish is to be granted, or not, it's up to @Erel.
His wish is based on his past experience, and on what he feels is lacking in b4x.
We may all disagree with him, but at the end of the day, he just expressed a Wish!
I for instance, wish to become rich! (Yeah, don't we all?) without having to move a finger, but wishing does not make my wish automatically come true!
So, bottom line, keep in mind that everyone is free to wish for a feature, and we, all the others, even if we don't agree with the Wish, don't need to make it personal, nor to prove that wish wrong!
Heck, i could wish the IDE to read my mind and code for me!
 

Star-Dust

Expert
Licensed User
(I'm about to advocate for the devil, but someone has to...)

Fernando expressed a wish.
If this wish is to be granted, or not, it's up to @Erel.
His wish is based on his past experience, and on what he feels is lacking in b4x.
We may all disagree with him, but at the end of the day, he just expressed a Wish!
I for instance, wish to become rich! (Yeah, don't we all?) without having to move a finger, but wishing does not make my wish automatically come true!
So, bottom line, keep in mind that everyone is free to wish for a feature, and we, all the others, even if we don't agree with the Wish, don't need to make it personal, nor to prove that wish wrong!
Heck, i could wish the IDE to read my mind and code for me!
If you become rich, my desire would be to be adopted by you :p
 

udg

Expert
Licensed User
Heck, i could wish the IDE to read my mind and code for me!
A decade or so more and that will be common..eheh
Well, maybe not literally reading your mind, but a tool that goes from specs to code.. Y NOT?
 
Top