Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

DOS- Variablen setzen

Empfohlene Antworten

Veröffentlicht

Hallo,

ich würde in einem 16 Bit- Programm ganz gerne eine DOS- Variable erstellen ändern. Bloß habe ich keine Ahnung, wie ich das machen kann. Mit dem Funktionsaufruf system("set new=C:\\TC") habe ich es bereits versucht, funktioniert bloß nicht. Die Variable sollte auch nach dem Beenden des Programms noch verfügbar sein.

Entwicklungsumgebung:

Borland TurboC++ 1.01

DOS 16 Bit

Also ich kenne die Microsoft-Version. Ich weiß aber nicht, ob das beim TurboC++ genauso ist, da mußt Du halt mal im Zweifelsfall die Header durchsuchen:


#include <stdlib.h>


void main( void )

{

   char *libvar;


   /* Get the value of the LIB environment variable. */

   libvar = getenv( "LIB" );


   if( libvar != NULL )

      printf( "Original LIB variable is: %s\n", libvar );


   /* Attempt to change path. Note that this only affects the environment

    * variable of the current process. The command processor's environment

    * is not changed.

    */

   _putenv( "LIB=c:\\mylib;c:\\yourlib" );


   /* Get new value. */

   libvar = getenv( "LIB" );


   if( libvar != NULL )

      printf( "New LIB variable is: %s\n", libvar );

}

es gibt beim TurboC++ 1.01 eine Funktion putenv. Diese Funktion verändert auch schön brav die Umgebungsvariablen. Allerdings werden die Änderungen wieder rückgängig gemacht, wenn das Programm beendet wird.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.