Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / General questions about vectors

Author
Message
mr Handy
17
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 10th Dec 2014 23:24
Hi. I would like to know what is a vector in comparison to variable. Will it blendWhy we need an empty variable when creating it, why there is no "vector exist" command, are they global or local, can I make local vectors in functions? Thanks.

basjak
15
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 11th Dec 2014 00:00
In programming, every single entry form is called a variable. And variables are usually presented as basic form in all medium to high level languages.

Any multiple entry form becomes an object that internally is a class or structure.

In fact all variable forms are objects even single variables but we need somewhere to start from.

Vectors in dbpro are global. If you want local vectors simply create your own structure.

WickedX
16
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 11th Dec 2014 01:09
The return value from the make vector/matrix functions was meant to flag success. The variable itself is useless since failure will cause an error. The variable is only required by the make functions for syntax. I have written a vector exist function a while back. Here’s the code.

mr Handy
17
Years of Service
User Offline
Joined: 7th Sep 2007
Location: out of TGC
Posted: 11th Dec 2014 09:12
Thank you, guys!

Login to post a reply

Server time is: 2025-05-12 10:17:22
Your offset time is: 2025-05-12 10:17:22