[Info-vax] Pascal question

Brian_R brian.a.reiter at gmail.com
Wed Jan 23 11:05:58 EST 2019


On Wednesday, January 23, 2019 at 3:00:15 PM UTC, Arne Vajhøj wrote:
> On 1/22/2019 2:58 AM, Brian_R wrote:
> > On Tuesday, January 22, 2019 at 1:44:04 AM UTC, John Reagan wrote:
> >> As for string manipulation, like upcase, it hasn't been a popular
> >> request.
> > 
> > Why would it be, its handled quite nicely by the OS libraries. I use
> > VMS Pascal on a daily basis and we use STR$xxxxx for standard string
> > handling.
> 
> I still think builtin Pascal functions would be nicer.
> 
> > Now additional routines (RTL preferred) for the manipulation of JSON
> > structures might be a plan.
> 
> Given that VMS Pascal AFAIK does not support any type of reflection,
> then there are heavy constraints on what is possible.
> 
> Do you basically just need a good parser that makes it easy to do:
> 
> JSON string---(generic parser)--->generic data structure---(custom 
> code)--->custom data structure

A generic parser would be fine. We effectively hand-rolled our own JSON-RPC interface using a standard C parser (called from Pascal) which returned a tree structure of json objects which we could iterate through using Pascal wrappers. 

LIB$FIND_IMAGE_SYMBOL was then used to find the RPC function in the library and the target Pascal routine called via LIB$CALLG. It worked and made it reasonably simple to extend, especially over the binary formats we'd been using previously.

The list of available routines and their parameters was stashed in a JSON configuration file.

> 
> ?
> Arne




More information about the Info-vax mailing list