• Welcome to Theos PowerBasic Museum 2017.

News:

Attachments are only available to registered users.
Please register using your full, real name.

Main Menu

Code-Formatter PB 10

Started by Theo Gottwald, January 18, 2011, 07:58:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paul Elliott

One of the benefits of my way is the GUI does not make a difference.
As long as the FmtOption UDT is identical  and there are 3 routines for the progressbar,
the SLL can be called & produce the same output.

Or if you still feel than I'm a whining girl then GO AHEAD AND DELETE THE WHOLE THING!!!!!
And make sure that no one keeps a copy of it.



Theo Gottwald

#256
Hallo Paul, how do you feel emotionally today?
I hope fine.
Here the sun is shinig, and the fact that you posted the source code shows me, that after all,
you have accepted the rules in the board like anybody else.

Ok, your source code is now the new version.

If i understand you right, somebody could take your "formatter SLL" and - for example - add it to his PB Editor,
or to Jose's Editor (where the Source code is public).

Sounds interesting to me.

Paul Elliott

Still roughly the same.

It seems that some people are allowed to call others defaming names.

So how soon are you going to clean up the messages?

Jon Eskdale

Hi Paul,

Many Thanks for all your work on this  - Very much appreciated

I have found one thing that doesn't quite work this is the
PRINT #3, JOIN$(s(), """,""") this gets converted to PRINT #3, JOIN$(s(), "" "," "")
which no longer compiles

Taken from the JOIN$ help
"If the delimiter expression is the 3-byte value of "," (which may be expressed in your source code as the string literal ""","""), a leading and trailing double-quote is added to each string section."

Thanks
Jon

Paul Elliott

Jon,

It's nice to hear that someone likes the program.

Easy fix. And for the record, the original program had the same problem.
Now allows multi-quoted string as long as there are an even number of them.

Updated in post #255. Only the DoFormat.bas file was updated.


Jon Eskdale

Hi Paul,

That Fixed it.  Thanks for the very quick fix.
:)

Appreciated

Jon

Peter Weis

Hi Paul,

what about code formatter? Hear nothing more of it. Is the project dead?

regards Peter

Theo Gottwald

Its not dead as long as the forum lives.
We can continue with it, if you want, when the actual project is in a good state.
As far as i know the final version of codeformatter was not yet completely usable.
As long as its not guaranteed, that it doesn't destroy peoples code, many will not use it.

Jon Eskdale

It is certainly in a usable state - I use it regularly without any problems.

If there was to be an issue then you can always revert to the backup

Can I say thank you to those that have created this excellent tool

Jon

Paul Elliott

Theo,

Where do you get these ideas?

As far as I know, there has only been 1 problem with the code I posted and it was a very
minor problem ( nothing to corrupt anything ). The problem was in the original code ( not
in any part that I changed ).


Theo Gottwald

My code is very complex, Paul.
Much above average.
Thats because i heavily use MACROS.

For example sometimes i have used a MACRO like:

MACRO ENDS = END SELECT
MACRO ENDF = END FUNCTION

just as example. Maybe because of such constructs, Code formatters are unable to handle my source code?
In my tests, the code formatter could not handle the things properly, while it was not the last version i have tested.

If you or Peter have a version and you state "Thats the final and gug-free version", then i'll make a posting under "Third Party" and tell people that we have a Code-Formatter for PB 10.

However, it should be able to format any Sourcecode (other then mine).
And the GUI should also be complete. Last version i saw, the GUI was incomplete.

Paul Elliott

Theo,

You were the one resorting to "name calling" to force me to post what I had.
Considering that Peter's last version was not working nor finished and he had
quit for a few months.

As far as I knew, everything was complete & worked. Including the GUI.
If someone has made changes since then that's not really my problem.

Surely anyone who uses a program to "reformat" the source would have enough
sense not to use it on the ONLY copy of their source code.

How's come it has taken you so long to voice any concern?



Theo Gottwald

Paul, your version is the last version.
If it works really fine and has no bugs, tell me then i'll give it  a try and make it the final.

Are you really READY with it?

If you say "yes", i will test it and see if there are bug.
My sourcecode is the ultimate killing code for all formatting tools.  ;D

Paul Elliott

Got an almighty high opinion of your code, don't you? Or is it just convuluted?

It's been 3 months and obviously you never bothered to test anything of mine.  ???


Theo Gottwald

Are we discussing my opinion here?
Lets stay with discussion about coding, Paul.
I hope you have the same high opinion about your own code, because then it wilöl be really bug free when I test it.
Would you say that it is?