Board Logo
« BB coding style guidance? »

Welcome Guest. Please Login or Register.
Nov 20th, 2017, 10:24pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ


« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: BB coding style guidance?  (Read 1173 times)
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3614
xx BB coding style guidance?
« Thread started on: Aug 27th, 2010, 08:42am »

In a thread BB___FONT, that really went offtopic, Janet Terra said:
Quote:
I am in full agreement with Stefan's opinion that the Just BASIC wiki site should be in strict compliance with the coding rules set forth in the Help File.

But are there any coding rules in a Help file?
Besides, in some places Help is less then clear (and in some - wrong).

Anyway, who needs more rules? Language syntax is enough - it either works or not.
But guidelines?
May be there should be set page with JB coding guidelines (best practices?) As Janet said in the tread Liberty BASIC Rosetta Code Project reply 15,
Quote:
(not to say that my own projects won't maintain my peculiar styling, but a community project should remain consistent)

- at lest community projects will be consistent?
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
uncleBen
Senior Member
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1679
xx Re: BB coding style guidance?
« Reply #1 on: Aug 29th, 2010, 12:47pm »

I think another thing to decide about listing syntax.

For ABS it is shown like this:
Code:
1. ABS(Number)
 


For ASC it is:

Code:
1. asc(string literal)
2. asc(string variable)
 


I would recommend using the first style everywhere. What matters is whether a function accepts a numeric or a string value, and you are not going to be able to list all the ways you could obtain the values. For example, as it is, why is it not mentioned that ASC can also accept the result of a function returning a string, an item in a string array?
User IP Logged

Passing arrays to subroutines, functions that work with any types, quick string indexing and much more - JBExtensions.

Tired of Minesweeper? Try TomatoSweeper
tsh73
JB-Supporter


member is offline

Avatar




PM

Gender: Male
Posts: 3614
xx Re: BB coding style guidance?
« Reply #2 on: Aug 29th, 2010, 1:57pm »

I agree.
For ASC(), literal or variable or array element, it doesn't matter at all.
User IP Logged

Q: "And if I took your codes and compile them, and sell them for a profit"?
A: Go ahead. I had my share of good then I coded it for fun, if you can make better use of it - please do.
(enjoying JB 1.01 on WinXP, netbook and desktop)
Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls