hi

im new to writing functions - still havent gotten to classes yet :) and having some trouble understanding which function can access which variable...

i have declared an array outside of any function... then i call a function, pass it a list(array) of urls and need to cycle the list and compare values to the array i declared outside to check that there are no matches... but the function doesn't seem to have access to that array?!

thanks

hi

thanks for the info, im disappointed that there isn't direct access, but i guess in a big system things could get out of hand :)

i decided to pass the array from function to function... then i rethought things and made a new function and rather just call it to do the check

the variables inside the functions are meant to be local to that function and the vairable outside it wen we pass it to the function through the function call, they are just copied to the local context of that function's local parameters
and not to confuse yourself with the local and the global parameters

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.