Suppressing Addelement() function

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
ar-s
Enthusiast
Enthusiast
Posts: 344
Joined: Sat Oct 06, 2007 11:20 pm
Location: France

Suppressing Addelement() function

Post by ar-s »

Why don't delete AddElement(exemple())
That could be "implicit" with only the command

exemple()="bob"

istead of

AddElement(example())
exemple()="bob"


PB should know we want to add a value because of "="
~Ar-S~
My Image Hoster for PB users
My webSite (french) with PB apps : LDVMULTIMEDIA
PB - 3.x / 5.7x / 6 - W11 x64 - Ryzen 7 3700x / #Rpi4

Code: Select all

r3p347 : 7ry : un71l d0n3 = 1
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Suppressing Addelement() function

Post by DarkDragon »

ar-s wrote:Why don't delete AddElement(exemple())
That could be "implicit" with only the command

exemple()="bob"

istead of

AddElement(example())
exemple()="bob"


PB should know we want to add a value because of "="
No. You copy a value with = into the current element. It shouldn't ever add a new element for assigning a value.
bye,
Daniel
User avatar
Kiffi
Addict
Addict
Posts: 1486
Joined: Tue Mar 02, 2004 1:20 pm
Location: Amphibios 9

Re: Suppressing Addelement() function

Post by Kiffi »

ar-s wrote:PB should know we want to add a value because of "="
then you are not able to change the content of an element anymore.

Greetings ... Kiffi
Hygge
DarkDragon
Addict
Addict
Posts: 2344
Joined: Mon Jun 02, 2003 9:16 am
Location: Germany
Contact:

Re: Suppressing Addelement() function

Post by DarkDragon »

Kiffi wrote:
ar-s wrote:PB should know we want to add a value because of "="
then you are not able to change the content of an element anymore.
Then we will end up with inflationary usage of DeleteElement :lol: and there will be many topics with the title "Suppressing DeleteElement() function"
bye,
Daniel
Post Reply