Recent Posts

Pages: 1 ... 8 9 [10]
91
General Discussion / Re: Basic Interpreter
« Last post by crcasey on November 15, 2016, 09:27:32 PM »
I don't think I have run into a basic version that normally can use a float type in the FOR ... STEP  <Float> format before.

Is this carried over from a Basic I have not used?  I can totally see where this will be great for camera moves and sprite translations.

-Cecil
92
Feature Requests and Bug Reports / Re: Manual Error Reporting
« Last post by crcasey on November 15, 2016, 09:04:37 PM »
Arrays that are no longer referenced by any variable or sprite are deallocated - the memory is freed.

- Bob

Are you actively managing memory fragmentation? 
Are there times when garbage collection will cause a slowdown in processing?  Assume something stupid like a stereo 16 bit, 1024 bin FFT running as part of the 32 bit side main loop.
Would those slowdowns ever show on the vectrex side as duplicate frames or stuttering?

-Cecil
93
General Discussion / Re: Basic Interpreter
« Last post by crcasey on November 15, 2016, 08:34:29 PM »
Thanks, Sorry to keep up the basic (ha) questions.

-C
94
General Discussion / Re: Basic Interpreter
« Last post by Vectrex32 on November 15, 2016, 08:33:17 PM »
Also a quick question on assignment and pointers...

a=10
b=a
b=b+10

is a = 10 or is a=20 now?

How about with more complex types like arrays?

-Cecil

a remains 10. However, if you did:

dim a[1]
a[1] = 10
b = a
b[1] = 20

then a[1] would also be 20. So scalar assignments are copies of the value while array assignments are copies of the references.

- Bob
 
95
General Discussion / Re: Basic Interpreter
« Last post by Vectrex32 on November 15, 2016, 08:29:58 PM »
BASIC has always used = for both assignment and comparison, so I'm just keeping with that tradition.

- Bob
96
General Discussion / Re: Basic Interpreter
« Last post by crcasey on November 15, 2016, 08:29:23 PM »
Also a quick question on assignment and pointers...

a=10
b=a
b=b+10

is a = 10 or is a=20 now?

How about with more complex types like arrays?

-Cecil
97
Feature Requests and Bug Reports / Re: Manual Error Reporting
« Last post by Vectrex32 on November 15, 2016, 08:27:59 PM »
Arrays that are no longer referenced by any variable or sprite are deallocated - the memory is freed.

- Bob
98
General Discussion / Re: Basic Interpreter
« Last post by crcasey on November 15, 2016, 08:27:27 PM »
Another question along this line...

Why keep = as both assignment and as an expression?

I find the C way of = being assignment and == being compare expression makes the code read more clearly.

-Cecil
99
Feature Requests and Bug Reports / Re: Manual Error Reporting
« Last post by crcasey on November 15, 2016, 08:23:54 PM »
If I am reading the manual correctly the initializer returns a handle(pointer) to the array, which can either then be stored in a variable as a handle, or be used directly as a function argument.  In the second case what happens to the array when the function ends?

Does each handle keep a record of objects tied to it so that garbage collection happens?

Or another case say you store the array handle in the variable asdf. 
Then you do asdf=nul.
What happens to the array data?

I guess I wonder how much program memory there is and what you have done for garbage collection?

-Cecil
100
Feature Requests and Bug Reports / Re: Manual Error Reporting
« Last post by Vectrex32 on November 15, 2016, 05:40:46 PM »
Yup, that's a mistake. Thanks for catching it.

- Bob
Pages: 1 ... 8 9 [10]