This commit is contained in:
Daniella / Tove 2022-08-01 18:37:51 +02:00
commit 84f9a143b0
4 changed files with 41 additions and 37 deletions

View file

@ -1978,7 +1978,6 @@ public class ISBPL {
} }
private static String readFile(File f) throws IOException { private static String readFile(File f) throws IOException {
//noinspection resource
FileInputStream fis = new FileInputStream(f); FileInputStream fis = new FileInputStream(f);
ByteArrayOutputStream bytes = new ByteArrayOutputStream(); ByteArrayOutputStream bytes = new ByteArrayOutputStream();
byte[] currentBytes = new byte[4096]; byte[] currentBytes = new byte[4096];
@ -1986,6 +1985,7 @@ public class ISBPL {
while ((len = fis.read(currentBytes)) > 0) { while ((len = fis.read(currentBytes)) > 0) {
bytes.write(currentBytes, 0, len); bytes.write(currentBytes, 0, len);
} }
fis.close();
return bytes.toString(); return bytes.toString();
} }

View file

@ -647,12 +647,6 @@
- -
## >TYPE_SHADOW
-
### Methods
## >TYPE_INT ## >TYPE_INT
- -
@ -669,36 +663,6 @@
- -
## >TYPE_BYTE
-
### Methods
## >TYPE_FUNCTION
-
### Methods
## >TYPE_FLOAT
-
### Methods
## >TYPE_NULL
-
### Methods
## >TYPE_LONG
-
### Methods
## >TYPE_STRING ## >TYPE_STRING
- -
@ -740,11 +704,21 @@
- -
#### `aput ::: -> `
-
#### `stackTraceToString ::: -> ` #### `stackTraceToString ::: -> `
- -
#### `aget ::: -> `
-
#### `construct ::: -> ` #### `construct ::: -> `
- -
@ -783,11 +757,21 @@
- -
#### `aput ::: -> `
-
#### `stackTraceToString ::: -> ` #### `stackTraceToString ::: -> `
- -
#### `aget ::: -> `
-
#### `construct ::: -> ` #### `construct ::: -> `
- -

View file

@ -712,11 +712,21 @@ over type definitions, to string processing.
Iterates through this array and calls the callable with the object (NOT the index). Iterates through this array and calls the callable with the object (NOT the index).
#### `aput ::: item idx -> `
Puts an item into the array
#### `stackTraceToString ::: -> string` #### `stackTraceToString ::: -> string`
Converts this array to a stack trace string. Only use on compatible arrays! Converts this array to a stack trace string. Only use on compatible arrays!
#### `aget ::: idx -> item`
Gets an item from the array
#### `construct ::: length -> array` #### `construct ::: length -> array`
Constructs an array with a length Constructs an array with a length

View file

@ -122,6 +122,8 @@ def Error construct error {
} }
} =Error } =Error
def __aput_native &aput =__aput_native
def TYPE_ARRAY construct array { def TYPE_ARRAY construct array {
; ;
construct { construct {
@ -150,6 +152,14 @@ def TYPE_ARRAY construct array {
} this foreach } this foreach
s s
} }
? {
with idx this ;
this idx aget
}
=? {
with item idx this ;
this idx item aput
}
} =TYPE_ARRAY } =TYPE_ARRAY
def Array TYPE_ARRAY =Array def Array TYPE_ARRAY =Array
def TYPE_STRING construct string array { def TYPE_STRING construct string array {