Skip to content

Commit

Permalink
Merge pull request #1158 from fesch/bugfix
Browse files Browse the repository at this point in the history
Version 3.32-20 candidate
  • Loading branch information
fesch committed Apr 10, 2024
2 parents 09f6920 + a0e7c23 commit 3e0b28c
Show file tree
Hide file tree
Showing 104 changed files with 1,650 additions and 1,444 deletions.
4 changes: 2 additions & 2 deletions buildapp.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
name="Structorizer"
displayname="Structorizer"
identifier="lu.fisch.Structorizer"
shortversion="3.32-19"
version="3.32-19"
shortversion="3.32-20"
version="3.32-20"
icon="icons/Structorizer.icns"
mainclassname="Structorizer"
copyright="Bob Fisch"
Expand Down
2 changes: 1 addition & 1 deletion samples/export/BASIC0/ComputeSum.bas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
60 REM The input check loop has been disabled (replaced by a simple unchecked input
70 REM instruction) in order to test the effect of indirect FileAPI dependency (only the
80 REM called subroutine directly requires FileAPI now).
90 REM Generated by Structorizer 3.32-01
90 REM Generated by Structorizer 3.32-20
100
110 REM Copyright (C) 2020-03-21 Kay Gürtzig
120 REM License: GPLv3-link
Expand Down
2 changes: 1 addition & 1 deletion samples/export/BASIC0/DrawRandomHistogram.bas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
10 REM Reads a random number file and draws a histogram accotrding to the
20 REM user specifications
30 REM Generated by Structorizer 3.32-01
30 REM Generated by Structorizer 3.32-20
40
50 REM Copyright (C) 2020-03-21 Kay Gürtzig
60 REM License: GPLv3-link
Expand Down
12 changes: 6 additions & 6 deletions samples/export/BASIC1/ComputeSum.bas
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Rem #828) with FileAPI dependency.
Rem The input check loop has been disabled (replaced by a simple unchecked input
Rem instruction) in order to test the effect of indirect FileAPI dependency (only the
Rem called subroutine directly requires FileAPI now).
Rem Generated by Structorizer 3.32-01
Rem Generated by Structorizer 3.32-20

Rem Copyright (C) 2020-03-21 Kay Gürtzig
Rem License: GPLv3-link
Expand Down Expand Up @@ -40,8 +40,8 @@ Rem fileClose(fileNo)
nValues = 0
Try
nValues = readNumbers(file_name, values, 1000)
Catch ex416be80b As Exception
Dim failure As String = ex416be80b.ToString()
Catch ex8d3ca0d As Exception
Dim failure As String = ex8d3ca0d.ToString()
PRINT failure
Stop
End Try
Expand Down Expand Up @@ -75,9 +75,9 @@ Function readNumbers(fileName As String, numbers As integer(50), maxNumbers As i
numbers(nNumbers) = number
nNumbers = nNumbers + 1
Loop
Catch ex75fbd788 As Exception
Dim error As String = ex75fbd788.ToString()
Throw New Exception()
Catch ex296eb024 As Exception
Dim error As String = ex296eb024.ToString()
Throw
Finally
fileClose(fileNo)
End Try
Expand Down
24 changes: 10 additions & 14 deletions samples/export/BASIC1/DrawRandomHistogram.bas
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Rem Reads a random number file and draws a histogram accotrding to the
Rem user specifications
Rem Generated by Structorizer 3.32-01
Rem Generated by Structorizer 3.32-20

Rem Copyright (C) 2020-03-21 Kay Gürtzig
Rem License: GPLv3-link
Expand Down Expand Up @@ -43,8 +43,8 @@ If fileNo > 0 Then
nObtained = 0
Try
nObtained = readNumbers(file_name, numberArray, 10000)
Catch ex1679c3ee As Exception
Dim failure As String = ex1679c3ee.ToString()
Catch ex6d5a8719 As Exception
Dim failure As String = ex6d5a8719.ToString()
PRINT failure
End Try
If nObtained > 0 Then
Expand All @@ -53,10 +53,8 @@ If fileNo > 0 Then
For i = 1 To nObtained-1
If numberArray(i) < min Then
min = numberArray(i)
Else
If numberArray(i) > max Then
max = numberArray(i)
End If
Elseif numberArray(i) > max Then
max = numberArray(i)
End If
Next i
Rem Interval width
Expand Down Expand Up @@ -110,10 +108,8 @@ Sub drawBarChart(values As double(50), nValues)
For k = 1 To nValues-1
If values(k) > values(kMax) Then
kMax = k
Else
If values(k) < values(kMin) Then
kMin = k
End If
Elseif values(k) < values(kMin) Then
kMin = k
End If
Next k
valMin = values(kMin)
Expand Down Expand Up @@ -184,9 +180,9 @@ Function readNumbers(fileName As String, numbers As integer(50), maxNumbers As i
numbers(nNumbers) = number
nNumbers = nNumbers + 1
Loop
Catch ex75fbd788 As Exception
Dim error As String = ex75fbd788.ToString()
Throw New Exception()
Catch ex296eb024 As Exception
Dim error As String = ex296eb024.ToString()
Throw
Finally
fileClose(fileNo)
End Try
Expand Down
28 changes: 12 additions & 16 deletions samples/export/C#/DrawRandomHistogram.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Structorizer 3.32-01
// Generated by Structorizer 3.32-20

// Copyright (C) 2020-03-21 Kay Gürtzig
// License: GPLv3-link
Expand Down Expand Up @@ -479,8 +479,8 @@ public static void Main(string[] args) {
try {
nObtained = readNumbers(file_name, numberArray, 10000);
}
catch(Exception ex1679c3ee) {
string failure = ex1679c3ee.ToString()
catch(Exception ex6d5a8719) {
string failure = ex6d5a8719.ToString()
Console.WriteLine(failure);
}
if (nObtained > 0) {
Expand All @@ -490,10 +490,8 @@ public static void Main(string[] args) {
if (numberArray[i] < min) {
min = numberArray[i];
}
else {
if (numberArray[i] > max) {
max = numberArray[i];
}
else if (numberArray[i] > max) {
max = numberArray[i];
}
}
// Interval width
Expand Down Expand Up @@ -531,24 +529,22 @@ public static void Main(string[] args) {
/// <param name="nValues"> TODO </param>
private static void drawBarChart(double[] values, ??? nValues) {
// TODO: Check and accomplish variable declarations:
// Used range of the Turtleizer screen
const int xSize = 500;
const int ySize = 500;
double valMin;
double valMax;
int kMin;
int kMax;

// Used range of the Turtleizer screen
const int xSize = 500;
const int ySize = 500;
kMin = 0;
kMax = 0;
for (int k = 1; k <= nValues-1; k += (1)) {
if (values[k] > values[kMax]) {
kMax = k;
}
else {
if (values[k] < values[kMin]) {
kMin = k;
}
else if (values[k] < values[kMin]) {
kMin = k;
}
}
valMin = values[kMin];
Expand Down Expand Up @@ -630,8 +626,8 @@ private static int readNumbers(string fileName, int[] numbers, int maxNumbers) {
nNumbers = nNumbers + 1;
}
}
catch(Exception ex75fbd788) {
string error = ex75fbd788.ToString()
catch(Exception ex296eb024) {
string error = ex296eb024.ToString()
throw;
}
finally {
Expand Down
21 changes: 8 additions & 13 deletions samples/export/C++/DrawRandomHistogram.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Structorizer 3.32-01
// Generated by Structorizer 3.32-20

// Copyright (C) 2020-03-21 Kay Gürtzig
// License: GPLv3-link
Expand All @@ -24,24 +24,22 @@ using std::string;
void drawBarChart(double values[50], ??? nValues)
{
// TODO: Check and accomplish variable declarations:
// Used range of the Turtleizer screen
const int xSize = 500;
const int ySize = 500;
double valMin;
double valMax;
int kMin;
int kMax;

// Used range of the Turtleizer screen
const int xSize = 500;
const int ySize = 500;
kMin = 0;
kMax = 0;
for (int k = 1; k <= nValues-1; k += (1)) {
if (values[k] > values[kMax]) {
kMax = k;
}
else {
if (values[k] < values[kMin]) {
kMin = k;
}
else if (values[k] < values[kMin]) {
kMin = k;
}
}
valMin = values[kMin];
Expand Down Expand Up @@ -157,7 +155,6 @@ int main(void)
}
// Index of the most populated interval
kMaxCount = 0;
numberArray[0] =;
nObtained = 0;
try {
nObtained = readNumbers(file_name, numberArray, 10000);
Expand All @@ -172,10 +169,8 @@ int main(void)
if (numberArray[i] < min) {
min = numberArray[i];
}
else {
if (numberArray[i] > max) {
max = numberArray[i];
}
else if (numberArray[i] > max) {
max = numberArray[i];
}
}
// Interval width
Expand Down
16 changes: 6 additions & 10 deletions samples/export/C/DrawRandomHistogram.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// program DrawRandomHistogram
// Generated by Structorizer 3.32-01
// Generated by Structorizer 3.32-20

// Copyright (C) 2020-03-21 Kay Gürtzig
// License: GPLv3-link
Expand Down Expand Up @@ -509,16 +509,15 @@ void drawBarChart(double values[50], ??? nValues)
int kMax;
int k;

// Used range of the Turtleizer screen
kMin = 0;
kMax = 0;
for (k = 1; k <= nValues-1; k += (1)) {
if (values[k] > values[kMax]) {
kMax = k;
}
else {
if (values[k] < values[kMin]) {
kMin = k;
}
else if (values[k] < values[kMin]) {
kMin = k;
}
}
valMin = values[kMin];
Expand Down Expand Up @@ -654,7 +653,6 @@ int main(void)
}
// Index of the most populated interval
kMaxCount = 0;
numberArray[0] =;
nObtained = 0;
// TODO: Find an equivalent for this non-supported try / catch block!
// try {
Expand All @@ -671,10 +669,8 @@ int main(void)
if (numberArray[i] < min) {
min = numberArray[i];
}
else {
if (numberArray[i] > max) {
max = numberArray[i];
}
else if (numberArray[i] > max) {
max = numberArray[i];
}
}
// Interval width
Expand Down
30 changes: 13 additions & 17 deletions samples/export/Java/DrawRandomHistogram.java
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Structorizer 3.32-01
// Generated by Structorizer 3.32-20

// Copyright (C) 2020-03-21 Kay Gürtzig
// License: GPLv3-link
Expand Down Expand Up @@ -51,8 +51,8 @@ public static void main(String[] args) {
try {
nObtained = readNumbers(file_name, numberArray, 10000);
}
catch (Exception ex1679c3ee) {
String failure = ex1679c3ee.getMessage()
catch (Exception ex6d5a8719) {
String failure = ex6d5a8719.getMessage()
System.out.println(failure);
}
if (nObtained > 0) {
Expand All @@ -62,10 +62,8 @@ public static void main(String[] args) {
if (numberArray[i] < min) {
min = numberArray[i];
}
else {
if (numberArray[i] > max) {
max = numberArray[i];
}
else if (numberArray[i] > max) {
max = numberArray[i];
}
}
// Interval width
Expand Down Expand Up @@ -450,24 +448,22 @@ public static void fileWriteLine(int fileNo, java.lang.Object data) throws java.
*/
private static void drawBarChart(double[] values, ??? nValues) {
// TODO: Check and accomplish variable declarations:
// Used range of the Turtleizer screen
final int xSize = 500;
final int ySize = 500;
double valMin;
double valMax;
int kMin;
int kMax;

// Used range of the Turtleizer screen
final int xSize = 500;
final int ySize = 500;
kMin = 0;
kMax = 0;
for (int k = 1; k <= nValues-1; k += (1)) {
if (values[k] > values[kMax]) {
kMax = k;
}
else {
if (values[k] < values[kMin]) {
kMin = k;
}
else if (values[k] < values[kMin]) {
kMin = k;
}
}
valMin = values[kMin];
Expand Down Expand Up @@ -548,9 +544,9 @@ private static int readNumbers(String fileName, int[] numbers, int maxNumbers) {
nNumbers = nNumbers + 1;
}
}
catch (Exception ex75fbd788) {
String error = ex75fbd788.getMessage()
throw ex75fbd788;
catch (Exception ex296eb024) {
String error = ex296eb024.getMessage()
throw ex296eb024;
}
finally {
fileClose(fileNo);
Expand Down
Loading

0 comments on commit 3e0b28c

Please sign in to comment.