From: Martina Friedrich To: designCPN@daimi.au.dk Date: Thu, 14 Aug 2003 11:18:44 +0200 (MEST) Subject: (dCPN) Question concerning the use of a real (in a union colorset) Dear ladies and gentlemen, I am a Civil Engineer student and I am working with Design/CPN in the course of my diploma thesis. The following problem occured: I have a problem concerning the use of a real number in a union colorset. I would like to model a color that can either be an integer, a real or a string. For example: color Int = int; color String = string; color Real = ???? color Int_String_Real = union I:Int + S:String + R: Real; It works extremely well if I only use numbers, i.e. integers and strings. However the application of real number is not accepted during the syntax check. In the Design/CPN 4.x manual addendum it is said that the real type can no longer be used as a color type. Unfortunately I am not in a position to understand the explanations concerning the conversion functions, i.e. IntInfToReal p i. Do these function need to be applied each time I would like to use a real number, e.g. as part of an output arc of a transition? Or is it possible to declare a color with type real which can be used during the whole modelling? How does the declaration node needs to look like and what is the type of the color that I would like to use as a real? I tried to model a color which should solve this problem by following the explanation stated below val IntInfToReal : int -> IntInf.int -> real my version: color Real = IntInf.int; However, Design/CPN does not allow me to use ‘Intinf.int’. What is ‘IntInf.int’? Is it a color type or just something in between. But then what is the type if I want to use reals? It would be absolutely helpful, if you could explain me the use of a real number by means of an example. Thank you so much in advance. Martina Friedrich ---- [[ Homepage and archive: http://www.daimi.au.dk/designCPN/email/ ]] [[ Subscribe: http://mailman.daimi.au.dk/mailman/listinfo/designcpn ]]