What does # mean?

I am looking at the FileUpload example that came with the Xojo install and in the UploadComplete event I see…

  Dim uploadFolder As FolderItem
  uploadFolder = App.ExecutableFile.Parent.Child("UploadedPictures")
  If Not uploadFolder.Exists Then
    #If DebugBuild Then
      uploadFolder.CreateAsFolder
    #Else
      MsgBox("Upload failed. Upload folder does not exist: " + uploadFolder.NativePath)
      Return
    #Endif
  End If

What does # mean?

Also I am not sure why the second if statement is there. I intend to use…

 Dim uploadFolder As FolderItem
  uploadFolder = App.ExecutableFile.Parent.Child("FileUploads")
  If Not uploadFolder.Exists Then
      uploadFolder.CreateAsFolder
  End If

Should I be doing something different?

Take a look at this.

@Jason Tait

Thanks Jason. l think I get it now. I should have searched before asking.

John

You’re welcome John and I’m happy to help. I’m not on here to lecture you about searching. :slight_smile:

The Octothorpe (love that name) leads into a compiler directive as jason points out

The # means nothing on its own
The entire token is “#if” which means something
There is also “#pragma” which is useful from time to time

And don’t forget #LoveXojo if you’re posting on Twitter :stuck_out_tongue: