Oxygen Basic
Programming => Bugs & Feature Requests => Topic started by: jcfuller on February 19, 2018, 05:23:09 AM
-
Charles,
Issues I found compiling with use rtl64.
To save you some time I am testing all the example code. This is the first folder: examples\Basics
I am testing the code files in alphabetical order.
I will progress folder to folder and post on a folder basis unless you have another preferred method.
James
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Example issues
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*
Folder: examples\Basics\
'------------------------------------------------------------------------------
Arrays.o2bas
OVERLAYS fails
'------------------------------------------------------------------------------
ByteTests.o2bas
OVERFLOW TEST fails
'------------------------------------------------------------------------------
Cast.o2bas
I don't think the first cast is correct???
'------------------------------------------------------------------------------
CodeWindow.o2bas
I commented the 2 ### lines and it works. I don't know what was the purpose?
'------------------------------------------------------------------------------
Equates.o2bas
I assumed
print a cm b cm c cm d cm e cm f
would print
1,2,3,four,6,8
instead it prints
3,3,four,6,8
'------------------------------------------------------------------------------
Gosub.o2bas
ERROR: nested declaration
WORD: sub
LINE: 25
FILE: main source
PASS: 2
'------------------------------------------------------------------------------
Loops.o2bas
Linker found unidentified names:
::_do._end_do level 0
'------------------------------------------------------------------------------
Rand.o2bas
rtl64 -> compiles but does not display when run
it is fine with rtl32
'------------------------------------------------------------------------------
-
Hi James,
at the moment I can only report my tests for 32-bit.
Arrays.o2bas: I get as a result: 67: C
ByteTests.o2bas: sometimes there is a problem with the print statement. But: print a(0) " " str a(1) should work
Cast.o2bas: this seems to be higher mathematics. If I use a=f or a= int f, the value for f will be 4 but g is false. So I think a=(int)f retrieves the address of f?
CodeWindow.o2bas: If I recall this correctly, ### is ignored since some time. I am not sure about #view? #show is used to display translated code.
Equates.o2bas: this is also a problem with print.
this: print a & cm b cm c cm d cm e cm f
or: print a + cm b cm c cm d cm e cm f
and: print %a cm %b cm %c cm %d cm %e cm f
did work for me.
Gosub.o2bas: I am not sure, but I believe Charles has removed defining functions/subs inside functions/subs?
Loops.o2bas: I found that: do {b+=1} while b<a is not supported any more for some time.
These are no solutions. I only wanted to show the results from a different (32-bit) perspective.
Roland
-
Example issues
'==============================================================================
examples\COM
'------------------------------------------------------------------------------
sapiDemo4.o2bas
'==============================================================================
examples\console
'------------------------------------------------------------------------------
NonBlockingCons.o2bas
ERROR: parameters mismatch for procedure rtlzeromemory
params given : #sys#sys@10
OPTIONS:
rtlzeromemory(dword)
WORD: 20
LINE: 98
FILE: main source
PASS: 2
'------------------------------------------------------------------------------
printf.o2bas
crashes when run
'==============================================================================
examples\DataProcessing
'------------------------------------------------------------------------------
InstrULCase.o2bas
fine with rtl32 fails with rtl64
'------------------------------------------------------------------------------
LineSplitter2.o2bas
fails when run (both rtl32/64)
'------------------------------------------------------------------------------
NumberFormat.o2bas
fine with rtl32 fails with rtl64
'------------------------------------------------------------------------------
Parsing.o2bas
compile error both rtl32/64
ERROR: Recursion suspected in macro expression
WORD: macro
LINE: 41
FILE: main source
PASS: 2
'------------------------------------------------------------------------------
RateCounter.o2bas
results different rtl32/64
'------------------------------------------------------------------------------
SearchText.o2bas
missing file "notes.txt"
'------------------------------------------------------------------------------
SetOfStrings3.o2bas
fails when run both rtl32/64
'------------------------------------------------------------------------------
SqliteDemo.o2bas
surprise! surprise!
I downloaded the latest 64bit sqlite3.dll, 3.22, and it worked fine.
'------------------------------------------------------------------------------
TestStringUtil.o2bas
fails when run with both rtl32/64
'------------------------------------------------------------------------------
TestTableUtil.o2bas
fails when run with rtl64. Ok with rtl32
'------------------------------------------------------------------------------
TimeAnalysis.o2bas
I don't think tis is working for rtl64
'------------------------------------------------------------------------------
-
Many thanks, James and Roland, keep it going :)
I have reworked the loop formats, and I'm working on Byte/String conversions which were not specifically 64 bit issues.
Nested functions are gone.
### ... ### is used for extracting blocks of Assembly code. It is not as useful as #show which displays the translated code per line, non-destructively.
-
These are some of my results. Perhaps they are of interest too.
sapiDemo4.o2bas: in JIT mode #recordof person shows internal record of person, which is interesting, but unfortunately I do not understand the internals. After pressing the Enter key, the speech will start. Compiling to 32-bit exe: #recordof is ignored, speech starts at once.
NonBlockingCons.o2bas: I think Charles has changed a bit the calling for pointers? If I use:
' ! SUB RtlZeroMemory LIB "kernel32.dll" (DWORD ptr, DWORD size)
! SUB RtlZeroMemory LIB "kernel32.dll" (sys Destination, DWORD Length)
or simply:
! RtlZeroMemory LIB "kernel32.dll" (sys Destination, DWORD Length)
then the app will work. ESC must be used to close the GUI win and also to close the Console win.
The 32-bit app is blocked by my (Fullversion) AV-Scanner. Impudence! I have sent away my exe for complete investigation.
Console.o2bas: This does only work in 32-bit mode. I assumed, that:
extern lib "msvcrt.dll"
would help for compiling to 64-bit, but there must be still missing something else.
LineSplitter2.o2bas: I assume there is something missing in function printLines? But I am not very familiar with the bstring type. Is this the same as string s[] ?
TestStringUtil.o2bas: This demo runs in JIT mode, but running the exe file created with: uses RTL32 crashes.
TimeAnalysis.o2bas: I added at the beginning the two lines:
$ filename "Test.exe"
uses RTL64
and the exe file seems to work. At least there are two results.
@James: Do you know a working, not too extended SQLite3 example? I would like to learn a little bit about this library.
Roland
-
Roland,
The Oxygenbasic sample is about all you need to get started, but you do need to learn the sql language to make better use of the sqlite3 library:
https://www.w3schools.com/sql/
James
-
'==============================================================================
Example Issues
'==============================================================================
examples\Diagnostics
'------------------------------------------------------------------------------
RegSnapshot.o2bas
rtl32 only
'------------------------------------------------------------------------------
'==============================================================================
examples\Image
'------------------------------------------------------------------------------
BmpProcess.o2bas
fails with both rtl32/64 using
string bmpfile="C:\OxygenBasic\projectsB\SDL\bmp\Angel.bmp"
'==============================================================================
examples\Linkage
'------------------------------------------------------------------------------
FuncLinkTbls.o2bas
fails rtl64
ok rtl32
'------------------------------------------------------------------------------
'==============================================================================
examples\Math
Ackermann.o2bas
Ok rtl32
Fails rtl64
'------------------------------------------------------------------------------
BCDMul.o2bas
ok rtl32
fails rtl64
'------------------------------------------------------------------------------
BigBinary.o2bas
output not the same rtl32/64
'------------------------------------------------------------------------------
FloorCeil.o2bas
ok rtl32
fails rtl64
'------------------------------------------------------------------------------
MandelTextA
fails rtl32/64
'------------------------------------------------------------------------------
Matrix2.o2bas
fails to compile rtl32/64
'------------------------------------------------------------------------------
MulHuge.o2bas
ok rtl32
fails rtl64
'------------------------------------------------------------------------------
NegNumFracPow2.o2bas
will not compile rtl32/64
'------------------------------------------------------------------------------
PiAlgorithm2.o2bas
ok rtl32
fails rtl64
'------------------------------------------------------------------------------
Random.o2bas
probably should be checked for output with rtl64
'------------------------------------------------------------------------------
SuccApproxTrig.o2bas
no compile rtl32/64
'------------------------------------------------------------------------------
-
'==============================================================================
Example Issues
'==============================================================================
examples\MetaProg
I'm not sure on most of them ???
'==============================================================================
examples\OOP\ClassLibrary
not tested. Not set up to create dll's at this time
'==============================================================================
examples\OOP\Features
'------------------------------------------------------------------------------
CompactLayout1.o2bas
CompactLayout2.o2bas
compile errors both rtl32/64
'------------------------------------------------------------------------------
examples\Parameters
ExplicitType.o2bas
I don't think (or know) if this is working correctly rtl32/64 ???
'------------------------------------------------------------------------------
NamedParams2.o2bas
rtl32/64
ERROR: stray comma:
WORD: ,
LINE: 43
FILE: main source
PASS: 2
'------------------------------------------------------------------------------
OptionalParams2.o2bas
rtl64 fails when run
'==============================================================================
examples\System
'------------------------------------------------------------------------------
CustomConsole.o2bas
problems with rtl64: does not recognize "exit"
'------------------------------------------------------------------------------
GetMonitorFreq.o2bas
rtl32/64 fail when run
'------------------------------------------------------------------------------
GetMonitorFreq2.o2bas
rtl32/64 fail when run
'------------------------------------------------------------------------------
MemoryPoolTimer.o2bas
rtl32/64 compiling issues
'------------------------------------------------------------------------------
ShellExecute.o2bas
???
'------------------------------------------------------------------------------
UsedMem.o2bas
different values rtl32/64. all zeros for 64
'------------------------------------------------------------------------------
ReadUnicode.o2bas
rtl64 fail when run
'------------------------------------------------------------------------------
'==============================================================================
examples\WideStrings
'------------------------------------------------------------------------------
ReadUnicode.o2bas
rtl64 fail when run
'==============================================================================
examples\WinGui
'------------------------------------------------------------------------------
DialogOpenFile1.o2bas
rtl64 fail when run
'------------------------------------------------------------------------------
-
Charles,
More example issues.
DataProcessing
Format1-3
InstrULcase 32bit only
LineSplitter2
NumberFormat 32bit only
Parsing
SearchText could not test without data file
SetOfStrings3
TestTableUtil
James
-
Thanks, James.
I know the DataProcessing files will all have to be reviewed. I may replace them entirely.