IsPicture and table elements

Discuss any general programming issues here
Post Reply
User avatar
Juan Carlos
Posts: 480
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

IsPicture and table elements

Post by Juan Carlos » Tue Feb 19, 2019 10:08 pm

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.

User avatar
airsoftsoftwair
Posts: 2968
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: IsPicture and table elements

Post by airsoftsoftwair » Wed Feb 20, 2019 7:13 pm

What do you mean by "dates"? The file date?

User avatar
Juan Carlos
Posts: 480
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Re: IsPicture and table elements

Post by Juan Carlos » Wed Feb 20, 2019 10:15 pm

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.

zylesea
Posts: 198
Joined: Tue Feb 16, 2010 12:50 am
Location: Westfalen/Germany
Contact:

Re: IsPicture and table elements

Post by zylesea » Wed Feb 20, 2019 11:23 pm

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

User avatar
Juan Carlos
Posts: 480
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Re: IsPicture and table elements

Post by Juan Carlos » Thu Feb 21, 2019 12:59 am

Well, if I understand to get every element in these cases is name of table .element, table.height table.width etc.

User avatar
Juan Carlos
Posts: 480
Joined: Mon Sep 06, 2010 1:02 pm
Contact:

Re: IsPicture and table elements

Post by Juan Carlos » Thu Feb 21, 2019 9:13 pm

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.

Post Reply