DefaultDir$ is not global by default ?

new BookmarkLockedFalling
alix
Junior Member
**

alix Avatar

Posts: 57

Post by alix on Jan 18, 2008 10:16:33 GMT -5

The code below does not work if the first line is commented out, i.e.
'global DefaultDir$
Am I doing something wrong ?


global DefaultDir$

filename$="\public\images\*.png"

result=DiplayJPG(filename,ドル 4)


wait

'*******************************************************

' functions

'*******************************************************

'

' DIPLAYJPG : get JPG files and display n at a time

'

function DiplayJPG(filename,ドル n)

files #g, DefaultDir$ + filename$



if #g HASANSWER() then

count = #g rowcount()

for i = 1 to count

if #g hasanswer() then

'retrieve info for next file

#g nextfile$()

img$=#g NAME$()

url$ = "http://localhost:8008/images/"

if count4 = 4 then

html "<br>"

count4=0

end if

count4=count4+1

html "<img src="""+url$+img$+""" img style='width: 200px; height: 150px;'>"

end if

next

end if

End Function




Last Edit: Jan 18, 2008 10:41:20 GMT -5 by alix
Just Learning...
carlgundel
Administrator
*****
Creator of Run BASIC

carlgundel Avatar

Posts: 975

carlgundel
Administrator
*****
Creator of Run BASIC

carlgundel Avatar

Posts: 975

StefanPendl
Global Moderator
*****

StefanPendl Avatar

Run for BASIC ...
Posts: 945

[b]Stefan[/b] - [a href=http://stefanpendl.runbasichosting.com/]Homepage[/a][br][br][b]Please give credit if you use code I post, no need to ask for permission.[/b][br][br]Run BASIC 1.01, Fire-/Waterfox (IE11, Edge), Windows 10 Professional x64, Intel Core i7-4710MQ 2.5GHz, 16GB RAM