Subject |
Re: What Other Languages Use Syntax Similar to dBASE?... more please |
From |
Lee Grant <camilee@nospam.comcast.net> |
Date |
Sat, 22 Apr 2023 15:36:24 -0400 |
Newsgroups |
dbase.getting-started |
On 4/22/2023 8:51 AM, Doug H. wrote:
>> Pretty easy transition from dBL, well supported
>> and tons of documentation.
> An easy transition, that's exactly what I'm looking for. Very helpful. Thank you!
Doug,
You may not think so, after you've written a program whose logic should
work, but doesn't, only to find out, the reason is because you didn't
properly indent the code. :)
Python uses indentation for forming conditional logic, so if you don't
indent properly, the conditional will fail. This is the one problem I
have with Python. :)
Here's a Tip from a tutorial for beginners:
> if statements in Python
>
> This is the syntax of a basic if statement:
>
> if <condition>:
> <code>
>
> If the condition is True, the code will run. Else, if it's False, the code will not run.
>
> 💡 Tip: there is a colon (:) at the end of the first line and the code is indented. This is essential in Python to make the code belong to the conditional.
So, as you see, you will have to learn syntax and other such things,
regardless of the language and the similarities. Honestly, other than
the low-level languages like Assembly and C, most languages today
whether scripting or compiled have OOP capability, but it all differs in
some form or another, with the exception I mentioned earlier about the
dot.notation.
Lee
|
|