Subj : Re: Progamming language for hackers? To : comp.programming From : Juuso Hukkanen Date : Wed Oct 12 2005 03:10 pm On Wed, 12 Oct 2005 10:32:45 +0100, Gerry Quinn wrote: >> That Toyota-example was for demonstrating a principle of t3d >> not being limited overly simple tasks, or environments. >> But if one has written a function which would open a car >> roof window, that function would be called like that. >If someone has written a program that opens a sun window, or opens a >roof aperture, or opens a roof window to x% open, how will it be >called? A very good question. Of cause there are limits how much data can be packed into a single sentence. First, "if" testing was only used allowing an alternative command-route if the target environment is not supported. To ventilate your bungalow: if(t3d_environment_IS_SUN_WINDOW()) /* returns always: yes = 1, no = 0 , ret < 0 = error code */ { t3d_open_SUN_WINDOW(); /* contains full list of #ifdef environment-> action choices*/ /* #ifdef MY_BUNGALOW #endif #ifdef SIBERIAN_DATCHA #endif */ } else if(t3d_environment_IS_ROOF_APERTURE()) { t3d_open_ROOF_WINDOW(); /* contains full list of #ifdef environment-> action choices*/ /* #ifdef LEXUS #endif #ifdef MY_BUNGALOW #endif */ } else { t3d_write_CONSOLE("environment stinks"); } Your last question requires a bit different approach. The X-parameter is used for giving a function additional values; using warargs. Thus #include #include int main(void) { if(t3d_environment_IS_ROOF_WINDOW()) { t3d_open_ROOF_WINDOW_PERCENTAGEXXX("45"); } else { fprintf(stderr,"could not open the roof window by 45 percentages"); } return(EXIT_SUCCESS); } Still in doubt, please send more challenges. Naturally I'd prefer to answer questions commonly needed in real-life computing tasks, like: t3d_convert_file_Rfile_HTML2TEXT t3d_create_BEEP_HZXXX_DURATIONXXX t3d_measure_file_Rbarray_OWNER Regards Juuso Hukkanen (to reply by e-mail set addresses month and year to correct) "t3d programming language" and the structure of t3d function prototype are trademarks of Juuso Hukkanen. Fair use is allowed within all material which is licensed under the Charity Open Source license (version 2005 or later). http://www.tele3d.com .