Yes PB is platform independent.
GetEnvironment PowerScript function
Description
Gets information about the operating system, processor, and screen display of the system.
Syntax
GetEnvironment ( environmentinfo )
Argument Description
environmentinfo The name of the Environment object that will hold the information about the environment
Return value
Integer. Returns 1 if it succeeds and -1 if an error occurs. If environmentinfo is NULL, GetEnvironment returns NULL.
Usage
In cross-platform development projects, you can call GetEnvironment in scripts and take actions based on the operating system. You can also find out the processor (Intel 386 or 486, 68000, and so on). The information also includes version numbers of the operating system and PowerBuilder.
You can call GetEnvironment to find out the number of colors supported by the system and the size of the screen. You can use the size information in a window's Open script to reset its X and Y properties.
---------------------------------------------------
Example:
This script runs another PowerBuilder application and uses the OSType property of the Environment object to determine how to specify the path:
string path
environment env
integer rtn
rtn = GetEnvironment(env)
IF rtn <> 1 THEN RETURN
CHOOSE CASE env.OSType
CASE aix!
path = "/export/home/pb_apps/analyze.exe"
CASE Windows!, WindowsNT!
path = "C:\PB_apps\analyze.exe"
CASE ELSE
RETURN
END CHOOSE
Run(path)
--------------------------------------------------------
For more informations see:
OnlineBook
Application technique
Part 7
General Techniques
Chapter 31
Building an Application for Multiple Platforms
--------------------------------------------------------