# ispassword

Determines if a password is stored. (version 4.75 or later)

## Format

    ispassword <filename> <password name>

## Remarks

A password identified by <password name> from the password file <filename> is determined if the password is stored in the file.

When a password identified by <password name> exists in the password file, the system variable "result" is set to 1. Otherwise, "result" is set to 0.

## Example

    strdim pw 2
    username = 'yutaka'

    ispassword 'pw.dat' username ; result: 0=false; 1=true
    if result = 1 then
      getpassword 'pw.dat' username pw[0]
      pw[1] = pw[0]
    else
      msg = 'What is your password for '
      strconcat msg username
      strconcat msg '?'
      passwordbox msg 'Enter your password'
      pw[0] = inputstr
      pw[1] = pw[0]
      setpassword 'pw.dat' username pw[0]
    endif

## See also

- getpassword
- setpassword