Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
translator, from BASIC to PASCAL (source code translator)
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
IRC channel
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
Search
Advanced search
Recent
Who is Indy mattias?
by
paweld
[
Today
at 04:17:53 pm]
InstallAware Using Lazaru...
by
msintle
[
Today
at 04:15:29 pm]
[solved] how to get class...
by
Joanna
[
Today
at 03:53:05 pm]
I just released a commerc...
by
BrassGear
[
Today
at 03:17:28 pm]
Does anyone know why thes...
by
Laksen
[
Today
at 03:04:14 pm]
Database standards OR Am ...
by
gidesa
[
Today
at 02:37:56 pm]
How to: create DLL file f...
by
TRon
[
Today
at 02:26:53 pm]
A fairly simple sound sol...
by
paweld
[
Today
at 01:46:11 pm]
Demoscene The Champs Crac...
by
KodeZwerg
[
Today
at 01:45:18 pm]
Access violation when ope...
by
Чебурашка
[
Today
at 12:27:34 pm]
Step-into the field sette...
by
Martin_fr
[
Today
at 11:31:48 am]
Access violation when re-...
by
Chris Osborne
[
Today
at 11:31:25 am]
AI, NLP and CAI: Text Gen...
by
Dzandaa
[
Today
at 11:03:26 am]
dwindows for Android
by
PierceNg
[
Today
at 10:54:44 am]
create system unit from s...
by
Laksen
[
Today
at 10:53:57 am]
[Solved] Find child contr...
by
Joanna
[
Today
at 09:53:43 am]
FpDebug unexpected Assemb...
by
Marc
[
Today
at 08:46:38 am]
Offical launch of the 1 B...
by
Handoko
[
Today
at 07:59:07 am]
Big Numbers Math
by
iLya2IK
[
Today
at 07:13:20 am]
Lazarus for Windows on aa...
by
dbannon
[
Today
at 07:02:55 am]
BUG REPORT: Unable to gen...
by
dbannon
[
Today
at 06:29:49 am]
what to do if my target M...
by
Laksen
[
Today
at 12:49:12 am]
For-in loop over constant...
by
ASerge
[
Today
at 12:36:09 am]
Converting a string/index...
by
TRon
[April 18, 2024, 11:56:37 pm]
exclude ALL packages from...
by
PascalDragon
[April 18, 2024, 11:33:29 pm]
« previous
next »
Print
Pages:
1
[
2
]
Author
Topic: translator, from BASIC to PASCAL (source code translator) (Read 8077 times)
wp
Hero Member
Posts: 11916
Re: translator, from BAS to PAS
«
Reply #15 on:
August 18, 2021, 06:38:24 pm »
These are my steps:
At the top of the file, add {$MODE TP}{$H-}
Compilation attempt --> For variable
basic
Error "Got Ansitring expected ShortString". Solution:
basfile
,
pasfile
are declared as
AnsiString
. Not sure, but I think this type does not exist in Turbo Pascal mode -> declare them as
String
Next compilation attempt --> Error in
FSplit(...)
: "String types have to match exactly in $V+ mode" --> Declare
bPath
,
bName
and
bExt
as
String
rather than
String[100]
Next compilation attempt --> successful
I am attaching the modified file.
Logged
juanirias
Full Member
Posts: 100
Re: translator, from BAS to PAS
«
Reply #16 on:
August 18, 2021, 07:48:45 pm »
Thanks!
now I have this error:
developer@Nitro-AN515-54:~/wip/MetOrbDet/BasPas$ ./bp TAYLOR.BAS
You compile TAYLOR.BAS with BasPas Version 0.602
Written by Andrea Tobian-Mezger 2003
Show also on:
http://groups.yahoo.com/group/BasPas
for informations and files
An unhandled exception occurred at $0000000000406505:
EInOutError: File not open
$0000000000406505
Logged
juanirias
Full Member
Posts: 100
Re: translator, from BAS to PAS
«
Reply #17 on:
September 13, 2021, 05:25:21 am »
A kind reminder; I request help
Logged
af0815
Hero Member
Posts: 1291
Re: translator, from BAS to PAS
«
Reply #18 on:
September 13, 2021, 07:29:46 am »
BTW: Your link to the group is not working.
Quote
EInOutError: File not open
Have you looked for the file, which is not open.
Logged
regards
Andreas
juanirias
Full Member
Posts: 100
Re: translator, from BAS to PAS
«
Reply #19 on:
September 14, 2021, 05:37:57 am »
is correct, the group no longer exists!
the code was taken from here:
https://www.exmortis.narod.ru/src_translate_eng.html/
regards, JUAN
Logged
juanirias
Full Member
Posts: 100
Re: translator, from BAS to PAS
«
Reply #20 on:
April 18, 2022, 04:50:08 am »
Hi!
Here 2 original source code for the same objective: take a BASIC file and convert to PASCAL.
Please review and try to get working please
regards, JUAN
Logged
Handoko
Hero Member
Posts: 5154
My goal: build my own game engine using Lazarus
Re: translator, from BASIC to PASCAL (source code translator)
«
Reply #21 on:
April 18, 2022, 09:21:20 am »
Thank you for sharing it.
Unfortunately I can't compile it using Lazarus 2.2.0. Got a compile-time error in ReplaceOutSBP function in bp.pas because it breaks the rule of immutable requirement. See the screenshot below and read the link:
https://wiki.freepascal.org/For#immutable_requirement
Logged
juanirias
Full Member
Posts: 100
Re: translator, from BASIC to PASCAL (source code translator)
«
Reply #22 on:
April 22, 2022, 12:38:23 am »
Thanks for answer...
regards, Juan
Logged
Zvoni
Hero Member
Posts: 2327
Re: translator, from BASIC to PASCAL (source code translator)
«
Reply #23 on:
April 22, 2022, 08:23:44 am »
Quote from: juanirias on April 22, 2022, 12:38:23 am
Thanks for answer...
regards, Juan
Never change the iteration-variable of a For-loop in code
Use Do While/Repeat Until
Logged
One System to rule them all, One Code to find them,
One IDE to bring them all, and to the Framework bind them,
in the Land of Redmond, where the Windows lie
---------------------------------------------------------------------
Code is like a joke: If you have to explain it, it's bad
juanirias
Full Member
Posts: 100
Re: translator, from BASIC to PASCAL (source code translator)
«
Reply #24 on:
April 25, 2022, 02:43:18 am »
I cant understand well, you can compile it ?!
It works ?
regards, Juan
Logged
Handoko
Hero Member
Posts: 5154
My goal: build my own game engine using Lazarus
Re: translator, from BASIC to PASCAL (source code translator)
«
Reply #25 on:
April 25, 2022, 07:11:37 am »
I cannot compile it. The error is in the
line #188
in
ReplaceOutSBP
function in
bp.pas
. I tested it using Lazarus 2.2.0 FPC 3.2.2.
Logged
juanirias
Full Member
Posts: 100
Re: translator, from BASIC to PASCAL (source code translator)
«
Reply #26 on:
April 27, 2022, 01:38:06 am »
Thanks for answer.
Logged
Print
Pages:
1
[
2
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
translator, from BASIC to PASCAL (source code translator)
TinyPortal
© 2005-2018