aldweb

Fermer I. aldweb

Fermer II. Gratuitiels PC

Fermer III. Gratuitiels Palm

Fermer IV. Partagiciels Palm

Fermer V. iziBasic Palm

Fermer VI. Connaissance Palm

Fermer VII. Ordinateur Poche

Fermer VIII. miniPortail

Spécial !



Version mobile
de l'aldweb Site

m.aldweb.com


Ni Français, ni Anglais ?

Essayez donc l'un de ces drapeaux :
[de] [es] [it] [pt]
Recherche




Météo / Spam / www

Météo Lyon


aldweb contre le SPAM


Newsletter
Pour avoir des nouvelles de ce site, inscrivez-vous à notre Newsletter.
S'abonner
Se désabonner
298 Abonnés
Sites web de la famille

Webmaster - Infos
News Amis
Visites

   visiteurs

   visiteurs en ligne

Sondage
Comment trouve-tu le nouvel habillage de l'aldweb Site ?
 
Superbe !
Joli
Moyen
Moche...
Résultats
forum.gifForum - iziBasic - Sujet n°1650

Forum - Forum
iziBasic - iziBasic


Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 257

actif  Sujet n° 1650  Random access of database files

le 01/09/2009 @ 01:51
par Roman

Anonyme



The kind of animation found in the Neko Cat example only works if the background is a solid color. In light of this, I've decided to try to store pixel colors in an array so I can restore them after I draw a bitmap over them. Naturally, this requires hundreds of numbers to be stored first.

So, to get to the point, I am having trouble reading these numbers in out of a database. Here's my sample code:

OPEN "pix" FOR RANDOM AS #1
PRINT #1, 17
INPUT #1, A$
CLOSE #1
PRINT A$
KILL "pix"

This is trying to get 17 written in the database, copied to an array, and read out on the screen. I believe the INPUT function is the one I'm having trouble with. Filez shows the "pix" database gains a record (17), but all that is displayed is 0, or "", depending on whether the variable is A or A$.

Perhaps I've said too much :D
  Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 1
--------
le 01/09/2009 @ 15:42
par Roman

Anonyme

visiteur
Well, the amateur has solved his own problem. The reason that A$ was only returning zero or nothing was because the record was blank... the last record that is, the one that A$ was being assigned to. To fix the problem, I amended it to the following:

PRINT #1, 17
SEEK #1, 1 'go to 1st record
INPUT #1, A$ 'read current record

Before, I was reading a blank, end of file record. That's all, folks.
  Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 2
--------
le 01/09/2009 @ 21:57
par aldweb

Anonyme

visiteur
Hello Roman,

I am not sure that your way of proceeding will be the most efficient one in terms of speed.
Have you considered adding a background image, eventually by small squares, so that you would only redraw before drawing back your image on top of the background?
Or you might also use the SAVESCREEN and RESTORESCREEN statements?

Cheers,
aldweb
Ecrire à aldweb   Poster une réponse  Haut

Warning: A non-numeric value encountered in /web5/aldweb/www/aldweb_com/www/thread.php on line 497
Réponse n° 3
--------
le 01/09/2009 @ 22:06
par Roman

Anonyme

visiteur
As it turns out, that is the route I'm going to need to take. I do like the idea of being able to transform the image's color though.
  Poster une réponse  Haut
actif sujet actif   clos sujet clos   Important! Important!   Nouveau Nouveau message   -   Rectifier Rectifier message   Clôturer Clôturer sujet   Remonter Remonter
[]
Catégories de discussion  Forum 



 
^ Haut ^