Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.os.vms    |    DEC's VAX* line of computers & VMS.    |    264,129 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 262,163 of 264,129    |
|    =?UTF-8?Q?Arne_Vajh=C3=B8j?= to All    |
|    Re: Screen management in C    |
|    30 Dec 24 21:31:41    |
      From: arne@vajhoej.dk              On 12/28/2024 11:52 AM, Arne Vajhøj wrote:       > On 12/27/2024 2:34 PM, Arne Vajhøj wrote:       >> On 12/27/2024 11:12 AM, Craig A. Berry wrote:       >>> On 12/27/24 9:17 AM, Arne Vajhøj wrote:       >>>> Because SMG$ are supporting Pascal/Basic/Cobol/Fortran then       >>>> many arguments are pass by descriptor and you will need to setup       >>>> those in C, so some familiarity with descriptors will be required.       >>>       >>> This has been discussed previously here:       >>>       >>> https://groups.google.com/g/comp.os.vms/c/ufBEqvGdglU       >>>       >>> That discussion has pointers to various examples,       >>       >> In general VMS Pascal/VMS Basic code should be maybe 25% shorter       >> than equivalent C code. But with a descriptor centric API like       >> SMG$ then it may be more like 40% shorter.       >>       >> One could make a nice wrapper in C++ encapsulating the context       >> and convert between stl::string / C char array and descriptors.       >       > If anyone want to try, then I suggest:       >       > $ CXX/POINTER=32 ...       >       > or you will regret it.              So I tried based on:       * almost 1:1 between wrapper methods and SMG$ functions       * integer in by reference -> by value       * integer out by reference -> integer return value       * string in by descriptor -> char* or stl::string in       * string out by descriptor -> stl::string return value       * status code -> throw exception       * expose displayid, pasteboardid and keyboardid so wrapper        can be mixed with custom SMG$ function calls       * use original SMG$ constants              Example:              #include |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca