[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

1737.0. "pascal example ?" by KETJE::DIERICK (Saw Vicky Vale lately ?) Wed Nov 15 1989 04:41

A customer of us is programming decwindows in Pascal.
He has some problems with a few routines, in particular on how to
pass parameters. If someone of you has examples on how to call

	XtAppCreateShell
	XtOpenDisplay
	XSynchronize

from Pascal, I would appreciate some info. I don't speak Pascal at all
myself.

Thanks,

Dominique
T.RTitleUserPersonal
Name
DateLines
1737.1FragmentsEPIK::BUEHLERIf it's not virtual, it's not realFri Nov 17 1989 13:4050
    I'm not aware of any changes that have been made in V5.3 to correct
    this situation, but some of the VAX bindings were slightly screwy, so
    falling back on the C bindings was the way to go.  Submitted for your
    amusement are the following workarounds:
    
>	XtAppCreateShell
    
   [HIDDEN] FUNCTION XtAppCreateShell(%IMMED shell_name : char_ptr;
                                      %IMMED class_name : char_ptr;
                                      %IMMED class : UNSIGNED;
                                      %IMMED display : UNSIGNED;
                                      %IMMED argv : UNSIGNED;
                                      %IMMED argc : INTEGER) : DWT$WIDGET;
    
       EXTERNAL;
    
    Where 'char_ptr' is ^CHAR and is a zero terminated C string.
    
    So you must construct the zero terminated strings yourself.  I
    built some utility routines for doing that from PASCAL, so if you
    want them, I can send them to you through the mail.
    
>	XtOpenDisplay
    
    This one has different problems.  You can use the VAX binding, but you
    have to play other games.  To specify zero for the 6th and 7th
    arguments, you have to pass a variable containing a zero, not just a
    zero constant.  I didn't use the urlist or arglist parameters...
    
    My 'nodename' variable was a VARYING OF CHAR.  The parentheses allow
    the compiler to construct a temporary copy of the string which can be
    passed correcty to the VAX binding.
    
    none := 0;
    display := XT$OPEN_DISPLAY(application_context,
                               (nodename), 'application', 'class',
                               %REF garbage, none, none, %REF garbage);
    
>	XSynchronize
    
    Back to the C bindings for this one.
    
    [HIDDEN] XSynchronize(%IMMED display : UNSIGNED;
                          %IMMED flags : UNSIGNED) : UNSIGNED;
    
       EXTERNAL;
    
    Hope this helps.
    
John
1737.2KETJE::DIERICKSaw Vicky Vale lately ?Thu Nov 23 1989 05:333
Thanks a lot for the info.

Dominique