Beginner, where is list of commands? and what is dim?

General discussion on mikroBasic PRO for PIC.
Author
Message
jkdevon
Posts: 6
Joined: 29 Jul 2010 18:19

Beginner, where is list of commands? and what is dim?

#1 Post by jkdevon » 29 Jul 2010 18:41

I have been through the manual and Milan Verle's new book but can't find a complete list of the MikroBasicPlus commands. Surely there must be a list giving a description of way the commands operate, maybe with examples.

Also the command "dim" appears frequently with no explanation. I have figured out it means "define" or maybe "dimension" . I have looked in books on melabs BasicPro and they all give command lists, but dim is not one of their commands.

A manual for experts ?

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: Beginner, where is list of commands? and what is dim?

#2 Post by p.erasmus » 29 Jul 2010 19:04

Go to this link for the compiler and down load the language reference which will teach you the Basic language
http://www.mikroe.com/eng/products/view ... o-for-pic/
Attachments
1.png
1.png (37.98 KiB) Viewed 4741 times
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

jkdevon
Posts: 6
Joined: 29 Jul 2010 18:19

Re: Beginner, where is list of commands? and what is dim?

#3 Post by jkdevon » 30 Jul 2010 19:43

Many thanks. I have the Quick) Reference guide but it seems incomplete. It typically says "Here are SOME valid.........", which implies there are more, that I can't find.

If you look at a book on the melabs basicpro, (I have one by Harprit Singh Sandhu) it gives 90 commands plus 27 operators/math functions, all with a brief explanation of what the command does. The Reference Guide comes nowhere near that and gives commands without explanation. If it is BasicPro it must be more or less equivalent to the melabs version but a list is nowhere to be found.

I am surprised that a company that has produced such a great demo board as the EasyPic6 and so much software/compilers has not made the effort to produce a clear, readable manual. I bought the Milan Verle book but it has been a disappointment. It assumes we know what many terms mean, "dim" is good example. I am still not sure what it means or when to use it, yet it is one the most commonly used commands. It is not defined in the manual or Milan Verle's book, but it is not in the melabs version of BasicPro

W4GNS
Posts: 38
Joined: 11 Jun 2010 02:47
Location: Virginia, USA

Re: Beginner, where is list of commands? and what is dim?

#4 Post by W4GNS » 30 Jul 2010 21:58

I have to agree with jkdevon, all good points

jkdevon wrote:Many thanks. I have the Quick) Reference guide but it seems incomplete. It typically says "Here are SOME valid.........", which implies there are more, that I can't find.

If you look at a book on the melabs basicpro, (I have one by Harprit Singh Sandhu) it gives 90 commands plus 27 operators/math functions, all with a brief explanation of what the command does. The Reference Guide comes nowhere near that and gives commands without explanation. If it is BasicPro it must be more or less equivalent to the melabs version but a list is nowhere to be found.

I am surprised that a company that has produced such a great demo board as the EasyPic6 and so much software/compilers has not made the effort to produce a clear, readable manual. I bought the Milan Verle book but it has been a disappointment. It assumes we know what many terms mean, "dim" is good example. I am still not sure what it means or when to use it, yet it is one the most commonly used commands. It is not defined in the manual or Milan Verle's book, but it is not in the melabs version of BasicPro
Gary W4GNS

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: Beginner, where is list of commands? and what is dim?

#5 Post by p.erasmus » 31 Jul 2010 13:19

am surprised that a company that has produced such a great demo board as the EasyPic6 and so much software/compilers has not made the effort to produce a clear, readable manual
You understand the things incorrectly - There is a complete manual available as a down load Called MikroBasic PIC User manual
in the download area which I posted to you just read properly and all the information regarding the compiler is also available
in the compiler help file jou must only select help or press F1 ,it is certainly not the companies fault
if you as a user can not read (yet you want to say bad things about the company)
Secondly the compiler is a tool which use the standard basic programming language you as the user should inform yourself about
the langauge , statements and key words it is not the responsibility of the compiler or mikro to teach you the Basic language nor is it the responsibility
or any person writing a book about pic microcontrollers and show you how to program them with the mikro compiler
you the user must ensure that you know the Basic language
Get real before you post statements that are totaly incorrect

example the key word dim is used to declare a variable however this has nothing to do with the compiler it is a language construct
which you learn when you learn the language
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

W4GNS
Posts: 38
Joined: 11 Jun 2010 02:47
Location: Virginia, USA

Re: Beginner, where is list of commands? and what is dim?

#6 Post by W4GNS » 31 Jul 2010 15:58

p.erasmus You are a very rude person, the OP was suggesting things to help him and improve the products. If you look through the forum and or docs you will see where MikroE has ask for comments on faults, needed improvements for there products. People like you scolding people on their forum will NOT cause a spike in sales.
Somewhere I have seen where they commented about there tools being beginner friendly, If that is the case then they don't need twits like you scolding people when they ask beginner questions or suggest things that could very possibly help the individual, and the company in the future. :evil:
If you're not offering help, or something positive why do you spend/wastes the time posting, as you scolding benefits no one.

Gary W4GNS

p.erasmus wrote:
am surprised that a company that has produced such a great demo board as the EasyPic6 and so much software/compilers has not made the effort to produce a clear, readable manual
You understand the things incorrectly - There is a complete manual available as a down load Called MikroBasic PIC User manual
in the download area which I posted to you just read properly and all the information regarding the compiler is also available
in the compiler help file jou must only select help or press F1 ,it is certainly not the companies fault
if you as a user can not read (yet you want to say bad things about the company)
Secondly the compiler is a tool which use the standard basic programming language you as the user should inform yourself about
the langauge , statements and key words it is not the responsibility of the compiler or mikro to teach you the Basic language nor is it the responsibility
or any person writing a book about pic microcontrollers and show you how to program them with the mikro compiler
you the user must ensure that you know the Basic language
Get real before you post statements that are totaly incorrect

example the key word dim is used to declare a variable however this has nothing to do with the compiler it is a language construct
which you learn when you learn the language
Gary W4GNS

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: Beginner, where is list of commands? and what is dim?

#7 Post by p.erasmus » 31 Jul 2010 16:16

first of all your bubble
does not change the fact that learing the Language is not the
responsibility of the Compiler ,and all the instruction to use
the compiler is in a good prepaired manual which both of you seem to have missed
dont blame the compiler if you are not able to use the basic language

I have helped more people in this forum than you had breakfast so dont you
come in here as Mr important and give me some use less comments
Somewhere I have seen where they commented about there tools being beginner friendly,
To make the tool more user friendly (which it is ) they should include a Basic language course
so that people like you can use it ,which no tool provider does in anycase, just to suite the 1%
of people that think it should be part of the tool !!!
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

W4GNS
Posts: 38
Joined: 11 Jun 2010 02:47
Location: Virginia, USA

Re: Beginner, where is list of commands? and what is dim?

#8 Post by W4GNS » 31 Jul 2010 18:16

Apparently you're not as much of an expert on all the compilers as you may think, there is a compiler (which I also own a copy of) that does list each keyword word and example uses.The manual is over 400 pages I will not mention a competitor's tools on others forum. I did not say I was having issues, as you seem to have interpreted, but I am a beginner and learning as time permits, and I'm having fun learning, I merely pointed out that on these micro controller forums there is always at least one "expert" who scolds people learning or wanting to learn. It's uncalled for and unnecessary.
p.erasmus wrote:

To make the tool more user friendly (which it is ) they should include a Basic language course
so that people like you can use it ,which no tool provider does in anycase, just to suite the 1%
of people that think it should be part of the tool !!!
Gary W4GNS

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: Beginner, where is list of commands? and what is dim?

#9 Post by p.erasmus » 31 Jul 2010 19:10

Apparently you're not as much of an expert on all the compilers as you may think, there is a compiler (which I also own a copy of) that does list each keyword word and example uses.The
This is done in the user manual and in the help file of mikroBasic so nothing special about your other compiler
I merely pointed out that on these micro controller forums there is always at least one "expert" who scolds people learning or wanting to learn. It's uncalled for and unnecessary.
I did not - I merely told the facts as it is clear that you /the OP expects the compiler documantation to teach you what the
meanings of the Key words is which is not the responsibility of the Compiler but the responsibility of a Basic language course
as said above all keywords are listed in the Documentation as well as all Library Functions
just read the manual
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

W4GNS
Posts: 38
Joined: 11 Jun 2010 02:47
Location: Virginia, USA

Re: Beginner, where is list of commands? and what is dim?

#10 Post by W4GNS » 31 Jul 2010 20:02

Why is this request such an issue for you ? Are you the one that would have to add or update ?
p.erasmus wrote: I did not - I merely told the facts as it is clear that you /the OP expects the compiler documantation to teach you what the
meanings of the Key words is which is not the responsibility of the Compiler but the responsibility of a Basic language course
as said above all keywords are listed in the Documentation as well as all Library Functions
just read the manual
Gary W4GNS

p.erasmus
Posts: 3391
Joined: 05 Mar 2009 10:28

Re: Beginner, where is list of commands? and what is dim?

#11 Post by p.erasmus » 31 Jul 2010 20:37

it is not an issue for me but clearly you still dit not noticed that
the request is already in the manuals

case closed
P.Erasmus
Saratov,Russia
--------------------------------------------------------------

Colin
Posts: 738
Joined: 15 Oct 2007 08:53
Location: Australia

Re: Beginner, where is list of commands? and what is dim?

#12 Post by Colin » 01 Aug 2010 02:02

Perhaps this might help those who do not know how to find things out

Image

W4GNS
Posts: 38
Joined: 11 Jun 2010 02:47
Location: Virginia, USA

Re: Beginner, where is list of commands? and what is dim?

#13 Post by W4GNS » 01 Aug 2010 02:55

Obviously you're not understanding the OP's question

p.erasmus wrote:it is not an issue for me but clearly you still dit not noticed that
the request is already in the manuals

case closed
Gary W4GNS

Colin
Posts: 738
Joined: 15 Oct 2007 08:53
Location: Australia

Re: Beginner, where is list of commands? and what is dim?

#14 Post by Colin » 01 Aug 2010 04:40

jkdevon wrote:I have been through the manual and Milan Verle's new book but can't find a complete list of the MikroBasicPlus commands. Surely there must be a list giving a description of way the commands operate, maybe with examples.

Also the command "dim" appears frequently with no explanation. I have figured out it means "define" or maybe "dimension" . I have looked in books on melabs BasicPro and they all give command lists, but dim is not one of their commands.

A manual for experts ?
Hello jkdevon,
Unfortunately in this world things are never perfect. The documentation provided by ME (not me) is an example.
Part of the learning curve is research.
But lets clear something up first. This is taken from the introduction pages of the mikroBasic PRO for PIC manual.
The mikroBasic PRO for PIC is a powerful, feature-rich development tool for PIC microcontrollers.
It is designed to provide the programmer with the easiest possible solution to developing applications
for embedded systems, without compromising performance or control.
It is not designed to teach the very basics of the Basic language.
Having said that, the introduction also states
If you are not very experienced in Basic programming, don't panic! mikroBasic PRO for PIC provides
plenty of examples making it easy for you to go quickly. We suggest that you first consult Projects and
Source Files, and then start browsing the examples that you are most interested in.
In chapter six under the heading of variables, it give an explanation of what Dim is for.
Chapter 6
Variables
Specifying a data type for each variable is mandatory. mikroBasic PRO for PIC
syntax for variable declaration is:
dim identifier_list as type Here, identifier_list is a comma_delimited list of valid identifiers, and type can be any data type.
Followed by examples

Code: Select all

Examples:
dim i, j, k as byte
dim counter, temp as word
dim samples as longint[100]
Then we have the book Programming Microcontrollers - Chapter 2 - Book: PIC Microcontroller.
Taken from page 9
A variable is a named object able to contain a data which can be modified during program execution. Every variable is declared under a unique
name which must be a valid identifier. For example, to add two numbers (number1 + number2) in the program, it is necessary to have a
variable to represent what we in everyday life call the sum. In this case number1, number and sum are variables. The syntax of one single
variable declaration is as follows:
dim variable_name as type
Variables in Basic are typed, which means that it is necessary to specify the type of data a variable is to receive. Variables are stored in RAM
and the memory space occupied (in bytes) depends on their type. In addition to single declarations, variables of the same type can be
declared as a list. Here, identifier_list is a comma-delimited list of valid identifiers, whereas type can be any data type.
dim i, j, k as byte 'Define variables i, j, k
dim counter, temp as word 'Define variables counter and temp
So don't get disheartened if you cannot find or understand what every statement or keyword does.
Read as much documentation as you can and look at some of the examples posted and in the examples folder.
Most are fairly well documented and if you still cannot understand, then by all means ask and ask again until you understand.
There are lots of people willing to help but some people do not respond well to negative unjustified criticism.
The Dim command has been around since the inception of Basic. I first encountered it in 1978. The compiler from Melabs do not use it, that's why it is not mentioned there.
Bottom line is keep reading, keep learning, keep asking and keep enjoying.

jkdevon
Posts: 6
Joined: 29 Jul 2010 18:19

Re: Beginner, where is list of commands? and what is dim?

#15 Post by jkdevon » 02 Aug 2010 23:56

WOW! I didn't think I would raise such a heated exchange, but many thanks to all, even Mr Erasmus, for the attention. In fact I am a great admirer of MikroElektroika and am sure I will get over my teething troubles. The EasyPic6 demo board is a masterpiece and I intend to master it.

I still think it is expecting a bit too much to ask a beginner to plow thru a 550 page manual searching for commands before starting to write programs. It would only take a few hours for somebody to write a list of the commands, with expalnations, and place it near the beginning of the manual. They give a list of reserved words, the words we can't use, but fail to give the words we can. It doesn't make sense. If you are dealing with beginners I think you should explain the subject at their level. A short course on the Basic in plain English would be appropriate.

To me the manual and the Reference Guide are almost unintelligible, (and worse still, deadly boring), due to both style and content. I am sure the excellent management at MikroElektronika are getting the message and these documents will be edited by a human being,

In the meantime I will press on,

Best Regards and thanks to all, jkdevon

Locked

Return to “mikroBasic PRO for PIC General”