Page 1 of 1

IsPicture and table elements

Posted: Tue Feb 19, 2019 10:08 pm
by Juan Carlos
I have the big doubt with this instruction and others how get the dates from its tables?
So this instruction ret, table = IsPicture(file$[, table]), I don't know how get the information from its table, some example, because I have leave to use some instructions for this reason.
Thanks.

Re: IsPicture and table elements

Posted: Wed Feb 20, 2019 7:13 pm
by airsoftsoftwair
What do you mean by "dates"? The file date?

Re: IsPicture and table elements

Posted: Wed Feb 20, 2019 10:15 pm
by Juan Carlos
airsoftsoftwair wrote: Wed Feb 20, 2019 7:13 pm What do you mean by "dates"? The file date?
I'm sorry for the dates, is the table contents how pass these a variables to can use them.

Re: IsPicture and table elements

Posted: Wed Feb 20, 2019 11:23 pm
by zylesea
ispicture returns a boolean variable (true or false) and a table with further information. The idex values of the table are provided within the manual. Access the just as every table.

A very simple example, a test whether a picture is a picture and if so, debugprint one of its parameters (in this case the height).

Code: Select all

ispic$, picpara$=ispicture(my_picture.jpg)
if ispic$=true 
 	debugprint("Height: ", picpara$.height) ;
else
 	debugprint ("Sorry, this is no picture") 
endif

Re: IsPicture and table elements

Posted: Thu Feb 21, 2019 12:59 am
by Juan Carlos
Well, if I understand to get every element in these cases is name of table .element, table.height table.width etc.

Re: IsPicture and table elements

Posted: Thu Feb 21, 2019 9:13 pm
by Juan Carlos
Thank you, zylesea for your explain, some instructions are difficult of understand in the guide and help without a clear example and with the instructions using tables more difficult.